You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/baselines/reference/promisePermutations.errors.txt
+8-31Lines changed: 8 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,6 @@
1
-
tests/cases/compiler/promisePermutations.ts(55,34): error TS2345: Argument of type '() => IPromise<number>' is not assignable to parameter of type '(error: any) => Promise<number>'.
2
-
Type 'IPromise<number>' is not assignable to type 'Promise<number>'.
3
-
tests/cases/compiler/promisePermutations.ts(56,34): error TS2345: Argument of type '() => IPromise<number>' is not assignable to parameter of type '(error: any) => Promise<number>'.
4
-
Type 'IPromise<number>' is not assignable to type 'Promise<number>'.
5
-
tests/cases/compiler/promisePermutations.ts(73,35): error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(error: any) => Promise<number>'.
6
-
Type 'IPromise<number>' is not assignable to type 'Promise<number>'.
7
-
tests/cases/compiler/promisePermutations.ts(74,35): error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(error: any) => Promise<number>'.
8
-
Type 'IPromise<number>' is not assignable to type 'Promise<number>'.
1
+
tests/cases/compiler/promisePermutations.ts(74,70): error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
2
+
Types of parameters 'x' and 'value' are incompatible.
3
+
Type 'number' is not assignable to type 'IPromise<number>'.
9
4
tests/cases/compiler/promisePermutations.ts(79,19): error TS2345: Argument of type '(x: number, y?: string) => IPromise<string>' is not assignable to parameter of type '(value: string) => IPromise<string>'.
10
5
Types of parameters 'x' and 'value' are incompatible.
11
6
Type 'number' is not assignable to type 'string'.
@@ -55,14 +50,10 @@ tests/cases/compiler/promisePermutations.ts(137,11): error TS2453: The type argu
55
50
tests/cases/compiler/promisePermutations.ts(144,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
56
51
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
57
52
Type 'string' is not assignable to type 'number'.
58
-
tests/cases/compiler/promisePermutations.ts(151,21): error TS2345: Argument of type '(x: any) => IPromise<number>' is not assignable to parameter of type '(value: {}) => Promise<number>'.
59
-
Type 'IPromise<number>' is not assignable to type 'Promise<number>'.
60
53
tests/cases/compiler/promisePermutations.ts(152,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
61
54
Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
tests/cases/compiler/promisePermutations.ts(153,36): error TS2345: Argument of type '(x: any) => IPromise<number>' is not assignable to parameter of type '(error: any) => Promise<number>'.
65
-
Type 'IPromise<number>' is not assignable to type 'Promise<number>'.
66
57
tests/cases/compiler/promisePermutations.ts(156,21): error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
67
58
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
68
59
Type 'number' is not assignable to type 'string'.
@@ -76,7 +67,7 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
76
67
Type 'Promise<number>' is not assignable to type 'IPromise<string>'.
@@ -132,13 +123,7 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
132
123
var s1a = s1.then(testFunction, testFunction, testFunction);
133
124
var s1b = s1.then(testFunctionP, testFunctionP, testFunctionP);
134
125
var s1c = s1.then(testFunctionP, testFunction, testFunction);
135
-
~~~~~~~~~~~~
136
-
!!! error TS2345: Argument of type '() => IPromise<number>' is not assignable to parameter of type '(error: any) => Promise<number>'.
137
-
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'Promise<number>'.
138
126
var s1d = s1.then(testFunctionP, testFunction, testFunction).then(testFunction, testFunction, testFunction);
139
-
~~~~~~~~~~~~
140
-
!!! error TS2345: Argument of type '() => IPromise<number>' is not assignable to parameter of type '(error: any) => Promise<number>'.
141
-
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'Promise<number>'.
142
127
143
128
var r2: IPromise<{ x: number; }>;
144
129
var r2a = r2.then(testFunction2, testFunction2, testFunction2);
@@ -156,13 +141,11 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
156
141
var s3a = s3.then(testFunction3, testFunction3, testFunction3);
157
142
var s3b = s3.then(testFunction3P, testFunction3P, testFunction3P);
158
143
var s3c = s3.then(testFunction3P, testFunction3, testFunction3);
159
-
~~~~~~~~~~~~~
160
-
!!! error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(error: any) => Promise<number>'.
161
-
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'Promise<number>'.
162
144
var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); // error
163
-
~~~~~~~~~~~~~
164
-
!!! error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(error: any) => Promise<number>'.
165
-
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'Promise<number>'.
145
+
~~~~~~~~~~~~~
146
+
!!! error TS2345: Argument of type '(x: number) => IPromise<number>' is not assignable to parameter of type '(value: IPromise<number>) => IPromise<number>'.
147
+
!!! error TS2345: Types of parameters 'x' and 'value' are incompatible.
148
+
!!! error TS2345: Type 'number' is not assignable to type 'IPromise<number>'.
166
149
167
150
var r4: IPromise<string>;
168
151
var sIPromise: (x: any) => IPromise<string>;
@@ -316,19 +299,13 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
316
299
var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok
317
300
var s10d = s10.then(sPromise, sPromise, sPromise); // ok
318
301
var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok
319
-
~~~~~~~~~
320
-
!!! error TS2345: Argument of type '(x: any) => IPromise<number>' is not assignable to parameter of type '(value: {}) => Promise<number>'.
321
-
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'Promise<number>'.
322
302
var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error
323
303
~~~~~~~~
324
304
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
325
305
!!! error TS2453: Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
326
306
!!! error TS2453: Types of property 'then' are incompatible.
0 commit comments