forked from microsoft/TypeScript
/
importCallExpressionES5CJS.types
70 lines (56 loc) · 2.76 KB
/
importCallExpressionES5CJS.types
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
=== tests/cases/conformance/dynamicImport/0.ts ===
export function foo() { return "foo"; }
>foo : () => string
>"foo" : "foo"
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1, onrejected?: (reason: any) => TResult2) => Promise<(TResult1 extends PromiseLike<infer UResult1> ? UResult1 : TResult1) | (TResult2 extends PromiseLike<infer UResult2> ? UResult2 : TResult2)>
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1, onrejected?: (reason: any) => TResult2) => Promise<(TResult1 extends PromiseLike<infer UResult1> ? UResult1 : TResult1) | (TResult2 extends PromiseLike<infer UResult2> ? UResult2 : TResult2)>
>zero => { return zero.foo();} : (zero: typeof import("tests/cases/conformance/dynamicImport/0")) => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
});
export var p2 = import("./0");
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
class C {
>C : C
method() {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
export class D {
>D : D
method() {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}