/
asyncFunctionReturnType.symbols
287 lines (251 loc) · 20.1 KB
/
asyncFunctionReturnType.symbols
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
=== tests/cases/compiler/asyncFunctionReturnType.ts ===
async function fAsync() {
>fAsync : Symbol(fAsync, Decl(asyncFunctionReturnType.ts, 0, 0))
// Without explicit type annotation, this is just an array.
return [1, true];
}
async function fAsyncExplicit(): Promise<[number, boolean]> {
>fAsyncExplicit : Symbol(fAsyncExplicit, Decl(asyncFunctionReturnType.ts, 3, 1))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
// This is contextually typed as a tuple.
return [1, true];
}
// https://github.com/Microsoft/TypeScript/issues/13128
interface Obj {
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
stringProp: string;
>stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
anyProp: any;
>anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
}
async function fIndexedTypeForStringProp(obj: Obj): Promise<Obj["stringProp"]> {
>fIndexedTypeForStringProp : Symbol(fIndexedTypeForStringProp, Decl(asyncFunctionReturnType.ts, 14, 1))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 16, 41))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
return obj.stringProp;
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 16, 41))
>stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
}
async function fIndexedTypeForPromiseOfStringProp(obj: Obj): Promise<Obj["stringProp"]> {
>fIndexedTypeForPromiseOfStringProp : Symbol(fIndexedTypeForPromiseOfStringProp, Decl(asyncFunctionReturnType.ts, 18, 1))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 20, 50))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
return Promise.resolve(obj.stringProp);
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 20, 50))
>stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
}
async function fIndexedTypeForExplicitPromiseOfStringProp(obj: Obj): Promise<Obj["stringProp"]> {
>fIndexedTypeForExplicitPromiseOfStringProp : Symbol(fIndexedTypeForExplicitPromiseOfStringProp, Decl(asyncFunctionReturnType.ts, 22, 1))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 24, 58))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
return Promise.resolve<Obj["stringProp"]>(obj.stringProp);
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 24, 58))
>stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
}
async function fIndexedTypeForAnyProp(obj: Obj): Promise<Obj["anyProp"]> {
>fIndexedTypeForAnyProp : Symbol(fIndexedTypeForAnyProp, Decl(asyncFunctionReturnType.ts, 26, 1))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 28, 38))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
return obj.anyProp;
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 28, 38))
>anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
}
async function fIndexedTypeForPromiseOfAnyProp(obj: Obj): Promise<Obj["anyProp"]> {
>fIndexedTypeForPromiseOfAnyProp : Symbol(fIndexedTypeForPromiseOfAnyProp, Decl(asyncFunctionReturnType.ts, 30, 1))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 32, 47))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
return Promise.resolve(obj.anyProp);
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 32, 47))
>anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
}
async function fIndexedTypeForExplicitPromiseOfAnyProp(obj: Obj): Promise<Obj["anyProp"]> {
>fIndexedTypeForExplicitPromiseOfAnyProp : Symbol(fIndexedTypeForExplicitPromiseOfAnyProp, Decl(asyncFunctionReturnType.ts, 34, 1))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 36, 55))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
return Promise.resolve<Obj["anyProp"]>(obj.anyProp);
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 36, 55))
>anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
}
async function fGenericIndexedTypeForStringProp<TObj extends Obj>(obj: TObj): Promise<TObj["stringProp"]> {
>fGenericIndexedTypeForStringProp : Symbol(fGenericIndexedTypeForStringProp, Decl(asyncFunctionReturnType.ts, 38, 1))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 40, 48))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 40, 66))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 40, 48))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 40, 48))
return obj.stringProp;
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 40, 66))
>stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
}
async function fGenericIndexedTypeForPromiseOfStringProp<TObj extends Obj>(obj: TObj): Promise<TObj["stringProp"]> {
>fGenericIndexedTypeForPromiseOfStringProp : Symbol(fGenericIndexedTypeForPromiseOfStringProp, Decl(asyncFunctionReturnType.ts, 42, 1))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 44, 57))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 44, 75))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 44, 57))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 44, 57))
return Promise.resolve(obj.stringProp);
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 44, 75))
>stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
}
async function fGenericIndexedTypeForExplicitPromiseOfStringProp<TObj extends Obj>(obj: TObj): Promise<TObj["stringProp"]> {
>fGenericIndexedTypeForExplicitPromiseOfStringProp : Symbol(fGenericIndexedTypeForExplicitPromiseOfStringProp, Decl(asyncFunctionReturnType.ts, 46, 1))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 48, 65))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 48, 83))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 48, 65))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 48, 65))
return Promise.resolve<TObj["stringProp"]>(obj.stringProp);
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 48, 65))
>obj.stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 48, 83))
>stringProp : Symbol(Obj.stringProp, Decl(asyncFunctionReturnType.ts, 11, 15))
}
async function fGenericIndexedTypeForAnyProp<TObj extends Obj>(obj: TObj): Promise<TObj["anyProp"]> {
>fGenericIndexedTypeForAnyProp : Symbol(fGenericIndexedTypeForAnyProp, Decl(asyncFunctionReturnType.ts, 50, 1))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 52, 45))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 52, 63))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 52, 45))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 52, 45))
return obj.anyProp;
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 52, 63))
>anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
}
async function fGenericIndexedTypeForPromiseOfAnyProp<TObj extends Obj>(obj: TObj): Promise<TObj["anyProp"]> {
>fGenericIndexedTypeForPromiseOfAnyProp : Symbol(fGenericIndexedTypeForPromiseOfAnyProp, Decl(asyncFunctionReturnType.ts, 54, 1))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 56, 54))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 56, 72))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 56, 54))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 56, 54))
return Promise.resolve(obj.anyProp);
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 56, 72))
>anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
}
async function fGenericIndexedTypeForExplicitPromiseOfAnyProp<TObj extends Obj>(obj: TObj): Promise<TObj["anyProp"]> {
>fGenericIndexedTypeForExplicitPromiseOfAnyProp : Symbol(fGenericIndexedTypeForExplicitPromiseOfAnyProp, Decl(asyncFunctionReturnType.ts, 58, 1))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 60, 62))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 60, 80))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 60, 62))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 60, 62))
return Promise.resolve<TObj["anyProp"]>(obj.anyProp);
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 60, 62))
>obj.anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 60, 80))
>anyProp : Symbol(Obj.anyProp, Decl(asyncFunctionReturnType.ts, 12, 23))
}
async function fGenericIndexedTypeForKProp<TObj extends Obj, K extends keyof TObj>(obj: TObj, key: K): Promise<TObj[K]> {
>fGenericIndexedTypeForKProp : Symbol(fGenericIndexedTypeForKProp, Decl(asyncFunctionReturnType.ts, 62, 1))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 64, 43))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 64, 60))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 64, 43))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 64, 83))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 64, 43))
>key : Symbol(key, Decl(asyncFunctionReturnType.ts, 64, 93))
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 64, 60))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 64, 43))
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 64, 60))
return obj[key];
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 64, 83))
>key : Symbol(key, Decl(asyncFunctionReturnType.ts, 64, 93))
}
async function fGenericIndexedTypeForPromiseOfKProp<TObj extends Obj, K extends keyof TObj>(obj: TObj, key: K): Promise<TObj[K]> {
>fGenericIndexedTypeForPromiseOfKProp : Symbol(fGenericIndexedTypeForPromiseOfKProp, Decl(asyncFunctionReturnType.ts, 66, 1))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 68, 52))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 68, 69))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 68, 52))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 68, 92))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 68, 52))
>key : Symbol(key, Decl(asyncFunctionReturnType.ts, 68, 102))
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 68, 69))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 68, 52))
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 68, 69))
return Promise.resolve(obj[key]);
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 68, 92))
>key : Symbol(key, Decl(asyncFunctionReturnType.ts, 68, 102))
}
async function fGenericIndexedTypeForExplicitPromiseOfKProp<TObj extends Obj, K extends keyof TObj>(obj: TObj, key: K): Promise<TObj[K]> {
>fGenericIndexedTypeForExplicitPromiseOfKProp : Symbol(fGenericIndexedTypeForExplicitPromiseOfKProp, Decl(asyncFunctionReturnType.ts, 70, 1))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 72, 60))
>Obj : Symbol(Obj, Decl(asyncFunctionReturnType.ts, 8, 1))
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 72, 77))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 72, 60))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 72, 100))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 72, 60))
>key : Symbol(key, Decl(asyncFunctionReturnType.ts, 72, 110))
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 72, 77))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 72, 60))
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 72, 77))
return Promise.resolve<TObj[K]>(obj[key]);
>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
>TObj : Symbol(TObj, Decl(asyncFunctionReturnType.ts, 72, 60))
>K : Symbol(K, Decl(asyncFunctionReturnType.ts, 72, 77))
>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 72, 100))
>key : Symbol(key, Decl(asyncFunctionReturnType.ts, 72, 110))
}