File: importCallExpressionInSystem2.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 (45 lines) | stat: -rw-r--r-- 1,418 bytes parent folder | download | duplicates (20)
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
=== tests/cases/conformance/dynamicImport/0.ts ===
export class B {
>B : B

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

=== tests/cases/conformance/dynamicImport/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 : (x: Promise<any>) => void
>x : Promise<any>

    x.then(value => {
>x.then(value => {        let b = new value.B();        b.print();    }) : Promise<void>
>x.then : <TResult1 = any, TResult2 = never>(onfulfilled?: (value: any) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>x : Promise<any>
>then : <TResult1 = any, TResult2 = never>(onfulfilled?: (value: any) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>value => {        let b = new value.B();        b.print();    } : (value: any) => void
>value : any

        let b = new value.B();
>b : any
>new value.B() : any
>value.B : any
>value : any
>B : any

        b.print();
>b.print() : any
>b.print : any
>b : any
>print : any

    })
}

foo(import("./0"));
>foo(import("./0")) : void
>foo : (x: Promise<any>) => void
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"