Update baseline from merging with master

This commit is contained in:
Kanchalai Tanglertsampan
2017-03-29 10:51:18 -07:00
parent 11f6eaec5b
commit d4754db443
21 changed files with 53 additions and 18 deletions
@@ -16,7 +16,6 @@ function returnDynamicLoad(path: string) {
}
//// [importCallExpressionDeclarationEmit1.js]
"use strict";
Promise.resolve().then(() => require(getSpecifier()));
var p0 = Promise.resolve().then(() => require(`${directory}\${moduleFile}`));
var p1 = Promise.resolve().then(() => require(getSpecifier()));
@@ -12,7 +12,6 @@ const p3 = import(,);
const p4 = import("pathToModule", "secondModule");
//// [importCallExpressionGrammarError.js]
"use strict";
var a = ["./0"];
Promise.resolve().then(() => require(...["PathModule"]));
var p1 = Promise.resolve().then(() => require(...a));
@@ -20,7 +20,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
function foo() { return "foo"; }
exports.foo = foo;
//// [1.js]
"use strict";
Promise.resolve().then(() => require("./0"));
var p1 = Promise.resolve().then(() => require("./0"));
p1.then(zero => {
@@ -29,7 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
function backup() { return "backup"; }
exports.backup = backup;
//// [2.js]
"use strict";
async function compute(promise) {
let j = await promise;
if (!j) {
@@ -24,7 +24,6 @@ class B {
}
exports.B = B;
//// [2.js]
"use strict";
// We use Promise<any> for now as there is no way to specify shape of module object
function foo(x) {
x.then(value => {
@@ -40,7 +40,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
function backup() { return "backup"; }
exports.backup = backup;
//// [2.js]
"use strict";
class C {
constructor() {
this.myModule = Promise.resolve().then(() => require("./0"));
@@ -0,0 +1,18 @@
//// [tests/cases/conformance/es2018/dynamicImport/importCallExpressionInScriptContext1.ts] ////
//// [0.ts]
export function foo() { return "foo"; }
//// [1.ts]
var p1 = import("./0");
function arguments() { } // this is allow as the file doesn't have implicit "use strict"
//// [0.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function foo() { return "foo"; }
exports.foo = foo;
//// [1.js]
var p1 = Promise.resolve().then(() => require("./0"));
function arguments() { } // this is allow as the file doesn't have implicit "use strict"
@@ -0,0 +1,12 @@
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
export function foo() { return "foo"; }
>foo : Symbol(foo, Decl(0.ts, 0, 0))
=== tests/cases/conformance/es2018/dynamicImport/1.ts ===
var p1 = import("./0");
>p1 : Symbol(p1, Decl(1.ts, 0, 3))
function arguments() { } // this is allow as the file doesn't have implicit "use strict"
>arguments : Symbol(arguments, Decl(1.ts, 0, 23))
@@ -0,0 +1,15 @@
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
export function foo() { return "foo"; }
>foo : () => string
>"foo" : "foo"
=== tests/cases/conformance/es2018/dynamicImport/1.ts ===
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>"./0" : "./0"
function arguments() { } // this is allow as the file doesn't have implicit "use strict"
>arguments : () => void
@@ -28,7 +28,6 @@ System.register([], function (exports_1, context_1) {
});
//// [1.js]
System.register([], function (exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
function foo() {
const p2 = context_1.import("./0");
@@ -33,7 +33,6 @@ System.register([], function (exports_1, context_1) {
});
//// [2.js]
System.register([], function (exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
// We use Promise<any> for now as there is no way to specify shape of module object
function foo(x) {
@@ -56,7 +56,6 @@ System.register([], function (exports_1, context_1) {
});
//// [2.js]
System.register([], function (exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var C;
return {
@@ -15,7 +15,6 @@ var p3 = import(["path1", "path2"]);
var p4 = import(()=>"PathToModule");
//// [importCallExpressionSpecifierNotStringTypeError.js]
"use strict";
// Error specifier is not assignable to string
Promise.resolve().then(() => require(getSpecifier()));
var p1 = Promise.resolve().then(() => require(getSpecifier()));
@@ -2,7 +2,7 @@
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */
// "lib": [], /* Specify library files to be included in the compilation: */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
@@ -2,7 +2,7 @@
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */
// "lib": [], /* Specify library files to be included in the compilation: */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
@@ -2,7 +2,7 @@
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */
// "lib": [], /* Specify library files to be included in the compilation: */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
@@ -2,7 +2,7 @@
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */
// "lib": [], /* Specify library files to be included in the compilation: */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
@@ -2,7 +2,7 @@
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */
"lib": ["es5","es2015.promise"], /* Specify library files to be included in the compilation: */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
@@ -2,7 +2,7 @@
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */
// "lib": [], /* Specify library files to be included in the compilation: */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
@@ -2,7 +2,7 @@
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */
"lib": ["es5","es2015.core"], /* Specify library files to be included in the compilation: */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
@@ -2,7 +2,7 @@
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'es2018'. */
// "lib": [], /* Specify library files to be included in the compilation: */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */