File: asyncAwaitNestedClasses_es5.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 (51 lines) | stat: -rw-r--r-- 1,587 bytes parent folder | download
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
=== tests/cases/conformance/async/es5/asyncAwaitNestedClasses_es5.ts ===
// https://github.com/Microsoft/TypeScript/issues/20744
class A {
>A : A

    static B = class B {
>B : typeof B
>class B {        static func2(): Promise<void> {            return new Promise((resolve) => { resolve(null); });        }        static C = class C {            static async func() {                await B.func2();            }        }    } : typeof B
>B : typeof B

        static func2(): Promise<void> {
>func2 : () => Promise<void>

            return new Promise((resolve) => { resolve(null); });
>new Promise((resolve) => { resolve(null); }) : Promise<void>
>Promise : PromiseConstructor
>(resolve) => { resolve(null); } : (resolve: (value?: void | PromiseLike<void>) => void) => void
>resolve : (value?: void | PromiseLike<void>) => void
>resolve(null) : void
>resolve : (value?: void | PromiseLike<void>) => void
>null : null
        }
        static C = class C {
>C : typeof C
>class C {            static async func() {                await B.func2();            }        } : typeof C
>C : typeof C

            static async func() {
>func : () => Promise<void>

                await B.func2();
>await B.func2() : void
>B.func2() : Promise<void>
>B.func2 : () => Promise<void>
>B : typeof B
>func2 : () => Promise<void>
            }
        }
    }
}

A.B.C.func();
>A.B.C.func() : Promise<void>
>A.B.C.func : () => Promise<void>
>A.B.C : typeof C
>A.B : typeof B
>A : typeof A
>B : typeof B
>C : typeof C
>func : () => Promise<void>