mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
//// [tests/cases/conformance/dynamicImport/importCallExpressionInCJS3.ts] ////
|
|
|
|
=== 0.ts ===
|
|
export class B {
|
|
>B : Symbol(B, Decl(0.ts, 0, 0))
|
|
|
|
print() { return "I am B"}
|
|
>print : Symbol(B.print, Decl(0.ts, 0, 16))
|
|
}
|
|
|
|
=== 2.ts ===
|
|
// We use Promise<any> for now as there is no way to specify shape of module object
|
|
function foo(x: Promise<any>) {
|
|
>foo : Symbol(foo, Decl(2.ts, 0, 0))
|
|
>x : Symbol(x, Decl(2.ts, 1, 13))
|
|
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --))
|
|
|
|
x.then(value => {
|
|
>x.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
|
|
>x : Symbol(x, Decl(2.ts, 1, 13))
|
|
>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
|
|
>value : Symbol(value, Decl(2.ts, 2, 11))
|
|
|
|
let b = new value.B();
|
|
>b : Symbol(b, Decl(2.ts, 3, 11))
|
|
>value : Symbol(value, Decl(2.ts, 2, 11))
|
|
|
|
b.print();
|
|
>b : Symbol(b, Decl(2.ts, 3, 11))
|
|
|
|
})
|
|
}
|
|
|
|
foo(import("./0"));
|
|
>foo : Symbol(foo, Decl(2.ts, 0, 0))
|
|
>"./0" : Symbol("./0", Decl(0.ts, 0, 0))
|
|
|