mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
27 lines
778 B
Plaintext
27 lines
778 B
Plaintext
//// [tests/cases/conformance/importDefer/dynamicImportDefer.ts] ////
|
|
|
|
=== a.ts ===
|
|
export function foo() {
|
|
>foo : Symbol(foo, Decl(a.ts, 0, 0))
|
|
|
|
console.log("foo from a");
|
|
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
|
|
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
|
|
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
|
|
}
|
|
|
|
=== b.ts ===
|
|
import.defer("./a.js").then(ns => {
|
|
>import.defer("./a.js").then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
|
|
>"./a.js" : Symbol("./a.js", Decl(a.ts, 0, 0))
|
|
>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
|
|
>ns : Symbol(ns, Decl(b.ts, 0, 28))
|
|
|
|
ns.foo();
|
|
>ns.foo : Symbol(foo, Decl(a.ts, 0, 0))
|
|
>ns : Symbol(ns, Decl(b.ts, 0, 28))
|
|
>foo : Symbol(foo, Decl(a.ts, 0, 0))
|
|
|
|
});
|
|
|