Skip to content

Instantly share code, notes, and snippets.

🇨🇲
Working on https://github.com/squall-io/joke* repos

Salathiel Genèse Yimga Yimga SalathielGenese

🇨🇲
Working on https://github.com/squall-io/joke* repos
Block or report user

Report or block SalathielGenese

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ts-web:index.ts
import { data } from './data.js';
alert( data.message );
View ts-web:index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>TypeScript for the web</title>
</head>
<body>
<script type="module" src="./index.js"></script>
View ts-web:index(initial).js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var data_1 = require("data");
alert(data_1.data.message);
View ts-web:index(initial).html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>TypeScript for the web</title>
</head>
<body>
<script src="./index.js"></script>
View ts-web:data.ts
export const data = {
message: 'Hello world',
};
View ts-web:index(initial).ts
import { data } from './data';
alert( data.message );
View ts-web:tsconfig(target+module).json
{
"compilerOptions": {
"target": "es2015",
"module": "es2015",
}
}
View ts-web:tsconfig(moduleResolution).json
{
"compilerOptions": {
"target": "es2015",
"module": "es2015",
"moduleResolution": "node",
}
}
View ts-web:tsconfig(initial).json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
}
}
You can’t perform that action at this time.