Skip to content

Commit 2632ac2

Browse files
committed
Accept new baselines
1 parent e416c70 commit 2632ac2

9 files changed

+52
-108
lines changed

tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T
88
Types of property 'concat' are incompatible.
99
Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ <U extends ReadonlyArray<B>>(...items: U[]): B[]; (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'.
1010
Type 'A[]' is not assignable to type 'B[]'.
11-
Type 'A' is not assignable to type 'B'.
1211

1312

1413
==== tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts (2 errors) ====
@@ -42,5 +41,4 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T
4241
!!! error TS2322: Types of property 'concat' are incompatible.
4342
!!! error TS2322: Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ <U extends ReadonlyArray<B>>(...items: U[]): B[]; (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'.
4443
!!! error TS2322: Type 'A[]' is not assignable to type 'B[]'.
45-
!!! error TS2322: Type 'A' is not assignable to type 'B'.
4644

tests/baselines/reference/mappedTypeRelationships.errors.txt

Lines changed: 52 additions & 76 deletions
Large diffs are not rendered by default.

tests/baselines/reference/promisePermutations.errors.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ tests/cases/compiler/promisePermutations.ts(133,19): error TS2345: Argument of t
4444
tests/cases/compiler/promisePermutations.ts(134,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
4545
tests/cases/compiler/promisePermutations.ts(137,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
4646
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
47-
Type 'string' is not assignable to type 'number'.
4847
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.
4948
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
50-
Type 'string' is not assignable to type 'number'.
5149
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.
5250
Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
5351
Types of property 'then' are incompatible.
@@ -61,7 +59,6 @@ tests/cases/compiler/promisePermutations.ts(156,21): error TS2345: Argument of t
6159
Type 'number' is not assignable to type 'string'.
6260
tests/cases/compiler/promisePermutations.ts(158,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>'.
6361
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
64-
Type 'number' is not assignable to type 'string'.
6562
tests/cases/compiler/promisePermutations.ts(159,21): error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
6663
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
6764
Type 'number' is not assignable to type 'string'.
@@ -286,7 +283,6 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
286283
~~~~~~~
287284
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
288285
!!! error TS2453: Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
289-
!!! error TS2453: Type 'string' is not assignable to type 'number'.
290286
var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
291287

292288
var r10 = testFunction10(x => x);
@@ -297,7 +293,6 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
297293
~~~~~~~~
298294
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
299295
!!! error TS2453: Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
300-
!!! error TS2453: Type 'string' is not assignable to type 'number'.
301296
var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
302297
var s10 = testFunction10P(x => x);
303298
var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok
@@ -328,7 +323,6 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t
328323
~~~~~~~~~~~~~~
329324
!!! error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
330325
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
331-
!!! error TS2345: Type 'number' is not assignable to type 'string'.
332326
var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error
333327
~~~~~~~~~~~~~~~
334328
!!! error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.

tests/baselines/reference/promisePermutations2.errors.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ tests/cases/compiler/promisePermutations2.ts(132,19): error TS2345: Argument of
4444
tests/cases/compiler/promisePermutations2.ts(133,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
4545
tests/cases/compiler/promisePermutations2.ts(136,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
4646
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
47-
Type 'string' is not assignable to type 'number'.
4847
tests/cases/compiler/promisePermutations2.ts(143,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
4948
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
50-
Type 'string' is not assignable to type 'number'.
5149
tests/cases/compiler/promisePermutations2.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
5250
Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
5351
Types of property 'then' are incompatible.
@@ -61,7 +59,6 @@ tests/cases/compiler/promisePermutations2.ts(155,21): error TS2345: Argument of
6159
Type 'number' is not assignable to type 'string'.
6260
tests/cases/compiler/promisePermutations2.ts(157,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>'.
6361
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
64-
Type 'number' is not assignable to type 'string'.
6562
tests/cases/compiler/promisePermutations2.ts(158,21): error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
6663
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
6764
Type 'number' is not assignable to type 'string'.
@@ -285,7 +282,6 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
285282
~~~~~~~
286283
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
287284
!!! error TS2453: Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
288-
!!! error TS2453: Type 'string' is not assignable to type 'number'.
289285
var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
290286

291287
var r10 = testFunction10(x => x);
@@ -296,7 +292,6 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
296292
~~~~~~~~
297293
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
298294
!!! error TS2453: Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
299-
!!! error TS2453: Type 'string' is not assignable to type 'number'.
300295
var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
301296
var s10 = testFunction10P(x => x);
302297
var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok
@@ -327,7 +322,6 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
327322
~~~~~~~~~~~~~~
328323
!!! error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
329324
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
330-
!!! error TS2345: Type 'number' is not assignable to type 'string'.
331325
var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // ok
332326
~~~~~~~~~~~~~~~
333327
!!! error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.

tests/baselines/reference/promisePermutations3.errors.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ tests/cases/compiler/promisePermutations3.ts(132,19): error TS2345: Argument of
4747
tests/cases/compiler/promisePermutations3.ts(133,19): error TS2345: Argument of type '<T>(x: T, cb: <U>(a: U) => U) => Promise<T>' is not assignable to parameter of type '(value: number) => IPromise<any>'.
4848
tests/cases/compiler/promisePermutations3.ts(136,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
4949
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
50-
Type 'string' is not assignable to type 'number'.
5150
tests/cases/compiler/promisePermutations3.ts(143,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
5251
Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
53-
Type 'string' is not assignable to type 'number'.
5452
tests/cases/compiler/promisePermutations3.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
5553
Type argument candidate 'Promise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
5654
Types of property 'then' are incompatible.
@@ -64,7 +62,6 @@ tests/cases/compiler/promisePermutations3.ts(155,21): error TS2345: Argument of
6462
Type 'number' is not assignable to type 'string'.
6563
tests/cases/compiler/promisePermutations3.ts(157,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>'.
6664
Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
67-
Type 'number' is not assignable to type 'string'.
6865
tests/cases/compiler/promisePermutations3.ts(158,21): error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.
6966
Type 'Promise<number>' is not assignable to type 'Promise<string>'.
7067
Type 'number' is not assignable to type 'string'.
@@ -297,7 +294,6 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
297294
~~~~~~~
298295
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
299296
!!! error TS2453: Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
300-
!!! error TS2453: Type 'string' is not assignable to type 'number'.
301297
var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
302298

303299
var r10 = testFunction10(x => x);
@@ -308,7 +304,6 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
308304
~~~~~~~~
309305
!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
310306
!!! error TS2453: Type argument candidate 'IPromise<number>' is not a valid type argument because it is not a supertype of candidate 'IPromise<string>'.
311-
!!! error TS2453: Type 'string' is not assignable to type 'number'.
312307
var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok
313308
var s10 = testFunction10P(x => x);
314309
var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok
@@ -339,7 +334,6 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
339334
~~~~~~~~~~~~~~
340335
!!! error TS2345: Argument of type '{ (x: number): IPromise<number>; (x: string): IPromise<string>; }' is not assignable to parameter of type '(value: number) => IPromise<string>'.
341336
!!! error TS2345: Type 'IPromise<number>' is not assignable to type 'IPromise<string>'.
342-
!!! error TS2345: Type 'number' is not assignable to type 'string'.
343337
var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error
344338
~~~~~~~~~~~~~~~
345339
!!! error TS2345: Argument of type '{ (x: number): Promise<number>; (x: string): Promise<string>; }' is not assignable to parameter of type '(value: number) => Promise<string>'.

tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.errors.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ tests/cases/compiler/trailingCommaInHeterogenousArrayLiteral1.ts(5,19): error TS
22
Type 'string | number' is not assignable to type 'number'.
33
Type 'string' is not assignable to type 'number'.
44
tests/cases/compiler/trailingCommaInHeterogenousArrayLiteral1.ts(6,19): error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'.
5-
Type 'string | number' is not assignable to type 'number'.
6-
Type 'string' is not assignable to type 'number'.
75

86

97
==== tests/cases/compiler/trailingCommaInHeterogenousArrayLiteral1.ts (2 errors) ====
@@ -19,8 +17,6 @@ tests/cases/compiler/trailingCommaInHeterogenousArrayLiteral1.ts(6,19): error TS
1917
this.test([1, 2, "hi", 5]);
2018
~~~~~~~~~~~~~~~
2119
!!! error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'number[]'.
22-
!!! error TS2345: Type 'string | number' is not assignable to type 'number'.
23-
!!! error TS2345: Type 'string' is not assignable to type 'number'.
2420
}
2521
}
2622

tests/baselines/reference/typeMatch2.errors.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ tests/cases/compiler/typeMatch2.ts(18,5): error TS2322: Type 'Animal[]' is not a
1212
tests/cases/compiler/typeMatch2.ts(22,5): error TS2322: Type '{ f1: number; f2: Animal[]; }' is not assignable to type '{ f1: number; f2: Giraffe[]; }'.
1313
Types of property 'f2' are incompatible.
1414
Type 'Animal[]' is not assignable to type 'Giraffe[]'.
15-
Type 'Animal' is not assignable to type 'Giraffe'.
1615
tests/cases/compiler/typeMatch2.ts(34,26): error TS2322: Type '{ x: number; y: any; z: number; }' is not assignable to type '{ x: number; y: number; }'.
1716
Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'.
1817
tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'.
@@ -62,7 +61,6 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is
6261
!!! error TS2322: Type '{ f1: number; f2: Animal[]; }' is not assignable to type '{ f1: number; f2: Giraffe[]; }'.
6362
!!! error TS2322: Types of property 'f2' are incompatible.
6463
!!! error TS2322: Type 'Animal[]' is not assignable to type 'Giraffe[]'.
65-
!!! error TS2322: Type 'Animal' is not assignable to type 'Giraffe'.
6664
}
6765

6866
function f4() {

tests/baselines/reference/typeParameterAssignability2.errors.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara
88
Type 'V' is not assignable to type 'T'.
99
Type 'Date' is not assignable to type 'T'.
1010
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(26,5): error TS2322: Type 'V' is not assignable to type 'T'.
11-
Type 'Date' is not assignable to type 'T'.
1211
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(27,5): error TS2322: Type 'Date' is not assignable to type 'T'.
1312
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(30,5): error TS2322: Type 'V' is not assignable to type 'U'.
1413
Type 'Date' is not assignable to type 'U'.
@@ -18,7 +17,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara
1817
Type 'V' is not assignable to type 'T'.
1918
Type 'Date' is not assignable to type 'T'.
2019
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(46,5): error TS2322: Type 'V' is not assignable to type 'T'.
21-
Type 'Date' is not assignable to type 'T'.
2220
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(47,5): error TS2322: Type 'Date' is not assignable to type 'T'.
2321
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typeParameterAssignability2.ts(50,5): error TS2322: Type 'V' is not assignable to type 'U'.
2422
Type 'Date' is not assignable to type 'U'.
@@ -76,7 +74,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara
7674
t = v; // error
7775
~
7876
!!! error TS2322: Type 'V' is not assignable to type 'T'.
79-
!!! error TS2322: Type 'Date' is not assignable to type 'T'.
8077
t = new Date(); // error
8178
~
8279
!!! error TS2322: Type 'Date' is not assignable to type 'T'.
@@ -112,7 +109,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/typePara
112109
t = v; // error
113110
~
114111
!!! error TS2322: Type 'V' is not assignable to type 'T'.
115-
!!! error TS2322: Type 'Date' is not assignable to type 'T'.
116112
t = new Date(); // error
117113
~
118114
!!! error TS2322: Type 'Date' is not assignable to type 'T'.

0 commit comments

Comments
 (0)