@@ -32,3 +32,79 @@ var r = c.compareTo(1, '');
32
32
>c : Symbol(c, Decl(implicitAnyGenericTypeInference.ts, 4, 3))
33
33
>compareTo : Symbol(Comparer.compareTo, Decl(implicitAnyGenericTypeInference.ts, 0, 23))
34
34
35
+ declare function f1<T>(cb: () => T): void;
36
+ >f1 : Symbol(f1, Decl(implicitAnyGenericTypeInference.ts, 6, 27))
37
+ >T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 8, 20))
38
+ >cb : Symbol(cb, Decl(implicitAnyGenericTypeInference.ts, 8, 23))
39
+ >T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 8, 20))
40
+
41
+ f1(() => null);
42
+ >f1 : Symbol(f1, Decl(implicitAnyGenericTypeInference.ts, 6, 27))
43
+
44
+ declare function f2<T>(cb: () => PromiseLike<T>): void;
45
+ >f2 : Symbol(f2, Decl(implicitAnyGenericTypeInference.ts, 9, 15))
46
+ >T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 11, 20))
47
+ >cb : Symbol(cb, Decl(implicitAnyGenericTypeInference.ts, 11, 23))
48
+ >PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --))
49
+ >T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 11, 20))
50
+
51
+ f2(async () => null);
52
+ >f2 : Symbol(f2, Decl(implicitAnyGenericTypeInference.ts, 9, 15))
53
+
54
+ declare function f3<T>(cb: () => Generator<T>): void;
55
+ >f3 : Symbol(f3, Decl(implicitAnyGenericTypeInference.ts, 12, 21))
56
+ >T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 14, 20))
57
+ >cb : Symbol(cb, Decl(implicitAnyGenericTypeInference.ts, 14, 23))
58
+ >Generator : Symbol(Generator, Decl(lib.es2015.generator.d.ts, --, --))
59
+ >T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 14, 20))
60
+
61
+ f3(function* () { yield null; });
62
+ >f3 : Symbol(f3, Decl(implicitAnyGenericTypeInference.ts, 12, 21))
63
+
64
+ declare function f4<T>(cb: () => Generator<unknown, T>): void;
65
+ >f4 : Symbol(f4, Decl(implicitAnyGenericTypeInference.ts, 15, 33))
66
+ >T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 17, 20))
67
+ >cb : Symbol(cb, Decl(implicitAnyGenericTypeInference.ts, 17, 23))
68
+ >Generator : Symbol(Generator, Decl(lib.es2015.generator.d.ts, --, --))
69
+ >T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 17, 20))
70
+
71
+ f4(function* () { return null; });
72
+ >f4 : Symbol(f4, Decl(implicitAnyGenericTypeInference.ts, 15, 33))
73
+
74
+ declare function f5<T>(cb: () => AsyncGenerator<T>): void;
75
+ >f5 : Symbol(f5, Decl(implicitAnyGenericTypeInference.ts, 18, 34))
76
+ >T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 20, 20))
77
+ >cb : Symbol(cb, Decl(implicitAnyGenericTypeInference.ts, 20, 23))
78
+ >AsyncGenerator : Symbol(AsyncGenerator, Decl(lib.es2018.asyncgenerator.d.ts, --, --))
79
+ >T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 20, 20))
80
+
81
+ f5(async function* () { yield null; });
82
+ >f5 : Symbol(f5, Decl(implicitAnyGenericTypeInference.ts, 18, 34))
83
+
84
+ declare function f6<T>(cb: () => AsyncGenerator<unknown, T>): void;
85
+ >f6 : Symbol(f6, Decl(implicitAnyGenericTypeInference.ts, 21, 39))
86
+ >T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 23, 20))
87
+ >cb : Symbol(cb, Decl(implicitAnyGenericTypeInference.ts, 23, 23))
88
+ >AsyncGenerator : Symbol(AsyncGenerator, Decl(lib.es2018.asyncgenerator.d.ts, --, --))
89
+ >T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 23, 20))
90
+
91
+ f6(async function* () { return null; });
92
+ >f6 : Symbol(f6, Decl(implicitAnyGenericTypeInference.ts, 21, 39))
93
+
94
+ // https://github.com/microsoft/TypeScript/issues/44913
95
+ Promise.resolve().catch(e => null);
96
+ >Promise.resolve().catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --))
97
+ >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
98
+ >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, --, --), Decl(lib.es2018.promise.d.ts, --, --))
99
+ >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
100
+ >catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --))
101
+ >e : Symbol(e, Decl(implicitAnyGenericTypeInference.ts, 27, 24))
102
+
103
+ Promise.resolve().then(v => null);
104
+ >Promise.resolve().then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
105
+ >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
106
+ >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, --, --), Decl(lib.es2018.promise.d.ts, --, --))
107
+ >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
108
+ >then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
109
+ >v : Symbol(v, Decl(implicitAnyGenericTypeInference.ts, 28, 23))
110
+
0 commit comments