diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpression1.ts b/tests/cases/conformance/es2018/dynamicImport/importCallExpression1.ts new file mode 100644 index 00000000000..f0fd00f9c79 --- /dev/null +++ b/tests/cases/conformance/es2018/dynamicImport/importCallExpression1.ts @@ -0,0 +1,11 @@ +// @module: es2018 +// @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(); +}) \ No newline at end of file diff --git a/tests/cases/conformance/es2018/dynamicImport/importCallExpression2.ts b/tests/cases/conformance/es2018/dynamicImport/importCallExpression2.ts new file mode 100644 index 00000000000..57ea587ce73 --- /dev/null +++ b/tests/cases/conformance/es2018/dynamicImport/importCallExpression2.ts @@ -0,0 +1,10 @@ +// @module: es2018 +// @lib: es2015 +// @filename: 0.ts +export function foo(){} + +// @filename: 1.ts +import * as Zero from "./0" // Should preserve ES2015 module syntax +import("./0"); +var p1 = import("./0"); +export default p1;