Add target ES5 emit

This commit is contained in:
Kanchalai Tanglertsampan 2017-04-28 15:40:21 -07:00
parent 35e2289951
commit a2d9fd4ac7
4 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,15 @@
// @module: amd
// @target: es5
// @filename: 0.ts
export function foo() { return "foo"; }
// @filename: 1.ts
import("./0");
var p1 = import("./0");
p1.then(zero => {
return zero.foo();
});
function foo() {
const p2 = import("./0");
}

View File

@ -0,0 +1,15 @@
// @module: commonjs
// @target: esnext
// @filename: 0.ts
export function foo() { return "foo"; }
// @filename: 1.ts
import("./0");
var p1 = import("./0");
p1.then(zero => {
return zero.foo();
});
function foo() {
const p2 = import("./0");
}

View File

@ -0,0 +1,15 @@
// @module: system
// @target: esnext
// @filename: 0.ts
export function foo() { return "foo"; }
// @filename: 1.ts
import("./0");
var p1 = import("./0");
p1.then(zero => {
return zero.foo();
});
function foo() {
const p2 = import("./0");
}

View File

@ -0,0 +1,15 @@
// @module: umd
// @target: esnext
// @filename: 0.ts
export function foo() { return "foo"; }
// @filename: 1.ts
import("./0");
var p1 = import("./0");
p1.then(zero => {
return zero.foo();
});
function foo() {
const p2 = import("./0");
}