File: importCallExpressionNoModuleKindSpecified.types

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (88 lines) | stat: -rw-r--r-- 3,425 bytes parent folder | download | duplicates (5)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
=== tests/cases/conformance/dynamicImport/0.ts ===
export class B {
>B : B

    print() { return "I am B"}
>print : () => string
>"I am B" : "I am B"
}

export function foo() { return "foo" }
>foo : () => string
>"foo" : "foo"

=== tests/cases/conformance/dynamicImport/1.ts ===
export function backup() { return "backup"; }
>backup : () => string
>"backup" : "backup"

=== tests/cases/conformance/dynamicImport/2.ts ===
declare var console: any;
>console : any

class C {
>C : C

    private myModule = import("./0");
>myModule : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"

    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"

        this.myModule.then(Zero => {
>this.myModule.then(Zero => {            console.log(Zero.foo());        }, async err => {            console.log(err);            let one = await import("./1");            console.log(one.backup());        }) : Promise<void>
>this.myModule.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>this.myModule : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>this : this
>myModule : 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 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>Zero => {            console.log(Zero.foo());        } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void
>Zero : typeof import("tests/cases/conformance/dynamicImport/0")

            console.log(Zero.foo());
>console.log(Zero.foo()) : any
>console.log : any
>console : any
>log : any
>Zero.foo() : string
>Zero.foo : () => string
>Zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string

        }, async err => {
>async err => {            console.log(err);            let one = await import("./1");            console.log(one.backup());        } : (err: any) => Promise<void>
>err : any

            console.log(err);
>console.log(err) : any
>console.log : any
>console : any
>log : any
>err : any

            let one = await import("./1");
>one : typeof import("tests/cases/conformance/dynamicImport/1")
>await import("./1") : typeof import("tests/cases/conformance/dynamicImport/1")
>import("./1") : Promise<typeof import("tests/cases/conformance/dynamicImport/1")>
>"./1" : "./1"

            console.log(one.backup());
>console.log(one.backup()) : any
>console.log : any
>console : any
>log : any
>one.backup() : string
>one.backup : () => string
>one : typeof import("tests/cases/conformance/dynamicImport/1")
>backup : () => string

        });
    }
}