File: asyncAwait_es6.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 (125 lines) | stat: -rw-r--r-- 2,896 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
=== tests/cases/conformance/async/es6/asyncAwait_es6.ts ===
type MyPromise<T> = Promise<T>;
>MyPromise : Promise<T>

declare var MyPromise: typeof Promise;
>MyPromise : PromiseConstructor
>Promise : PromiseConstructor

declare var p: Promise<number>;
>p : Promise<number>

declare var mp: MyPromise<number>;
>mp : Promise<number>

async function f0() { }
>f0 : () => Promise<void>

async function f1(): Promise<void> { }
>f1 : () => Promise<void>

async function f3(): MyPromise<void> { }
>f3 : () => Promise<void>

let f4 = async function() { }
>f4 : () => Promise<void>
>async function() { } : () => Promise<void>

let f5 = async function(): Promise<void> { }
>f5 : () => Promise<void>
>async function(): Promise<void> { } : () => Promise<void>

let f6 = async function(): MyPromise<void> { }
>f6 : () => Promise<void>
>async function(): MyPromise<void> { } : () => Promise<void>

let f7 = async () => { };
>f7 : () => Promise<void>
>async () => { } : () => Promise<void>

let f8 = async (): Promise<void> => { };
>f8 : () => Promise<void>
>async (): Promise<void> => { } : () => Promise<void>

let f9 = async (): MyPromise<void> => { };
>f9 : () => Promise<void>
>async (): MyPromise<void> => { } : () => Promise<void>

let f10 = async () => p;
>f10 : () => Promise<number>
>async () => p : () => Promise<number>
>p : Promise<number>

let f11 = async () => mp;
>f11 : () => Promise<number>
>async () => mp : () => Promise<number>
>mp : Promise<number>

let f12 = async (): Promise<number> => mp;
>f12 : () => Promise<number>
>async (): Promise<number> => mp : () => Promise<number>
>mp : Promise<number>

let f13 = async (): MyPromise<number> => p;
>f13 : () => Promise<number>
>async (): MyPromise<number> => p : () => Promise<number>
>p : Promise<number>

let o = {
>o : { m1(): Promise<void>; m2(): Promise<void>; m3(): Promise<void>; }
>{	async m1() { },	async m2(): Promise<void> { },	async m3(): MyPromise<void> { }} : { m1(): Promise<void>; m2(): Promise<void>; m3(): Promise<void>; }

	async m1() { },
>m1 : () => Promise<void>

	async m2(): Promise<void> { },
>m2 : () => Promise<void>

	async m3(): MyPromise<void> { }
>m3 : () => Promise<void>

};

class C {
>C : C

	async m1() { }
>m1 : () => Promise<void>

	async m2(): Promise<void> { }
>m2 : () => Promise<void>

	async m3(): MyPromise<void> { }
>m3 : () => Promise<void>

	static async m4() { }
>m4 : () => Promise<void>

	static async m5(): Promise<void> { }
>m5 : () => Promise<void>

	static async m6(): MyPromise<void> { }
>m6 : () => Promise<void>
}

module M {
>M : typeof M

	export async function f1() { }
>f1 : () => Promise<void>
}

async function f14() {
>f14 : () => Promise<void>

    block: {
>block : any

        await 1;
>await 1 : 1
>1 : 1

        break block;
>block : any
    }
}