mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
32 lines
523 B
TypeScript
32 lines
523 B
TypeScript
//// [tests/cases/conformance/dynamicImport/importCallExpression2ES2020.ts] ////
|
|
|
|
//// [0.ts]
|
|
export class B {
|
|
print() { return "I am B"}
|
|
}
|
|
|
|
//// [2.ts]
|
|
function foo(x: Promise<any>) {
|
|
x.then(value => {
|
|
let b = new value.B();
|
|
b.print();
|
|
})
|
|
}
|
|
|
|
foo(import("./0"));
|
|
|
|
|
|
//// [0.js]
|
|
export class B {
|
|
print() { return "I am B"; }
|
|
}
|
|
//// [2.js]
|
|
"use strict";
|
|
function foo(x) {
|
|
x.then(value => {
|
|
let b = new value.B();
|
|
b.print();
|
|
});
|
|
}
|
|
foo(import("./0"));
|