Skip to content

Commit adeafcc

Browse files
committed
Accept new baselines
1 parent 5f947f8 commit adeafcc

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

tests/baselines/reference/narrowingByTypeofInSwitch.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ function multipleGenericFuse<X extends L | number, Y extends R | number>(xy: X |
552552

553553
case 'function': return [xy, 1];
554554
>'function' : "function"
555-
>[xy, 1] : [X & Function, 1]
555+
>[xy, 1] : [X & Function, number]
556556
>xy : X & Function
557557
>1 : 1
558558

@@ -1092,7 +1092,7 @@ function multipleGenericFuseWithBoth<X extends L | number, Y extends R | number>
10921092

10931093
case `function`: return [xy, 1];
10941094
>`function` : "function"
1095-
>[xy, 1] : [X & Function, 1]
1095+
>[xy, 1] : [X & Function, number]
10961096
>xy : X & Function
10971097
>1 : 1
10981098

tests/baselines/reference/spreadsAndContextualTupleTypes.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ fx1([...t3, 'a']);
3333
>'a' : "a"
3434

3535
fx2(['x', 'y', 'z', 'a']);
36-
>fx2(['x', 'y', 'z', 'a']) : ["x", "y", "z", "a"]
36+
>fx2(['x', 'y', 'z', 'a']) : [string, string, string, "a"]
3737
>fx2 : <T extends [...string[], "a" | "b"]>(x: T) => T
38-
>['x', 'y', 'z', 'a'] : ["x", "y", "z", "a"]
38+
>['x', 'y', 'z', 'a'] : [string, string, string, "a"]
3939
>'x' : "x"
4040
>'y' : "y"
4141
>'z' : "z"
@@ -56,7 +56,7 @@ const x1: [...string[], '!'] = ['!'];
5656

5757
const x2: [...string[], '!'] = ['a', '!'];
5858
>x2 : [...string[], "!"]
59-
>['a', '!'] : ["a", "!"]
59+
>['a', '!'] : [string, "!"]
6060
>'a' : "a"
6161
>'!' : "!"
6262

tests/baselines/reference/variadicTuples1.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ tests/cases/conformance/types/tuple/variadicTuples1.ts(191,5): error TS2322: Typ
3636
tests/cases/conformance/types/tuple/variadicTuples1.ts(203,5): error TS2322: Type 'string' is not assignable to type 'keyof [1, 2, ...T]'.
3737
Type '"2"' is not assignable to type '"0" | "1" | keyof T[]'.
3838
tests/cases/conformance/types/tuple/variadicTuples1.ts(357,26): error TS2322: Type 'string' is not assignable to type 'number'.
39-
tests/cases/conformance/types/tuple/variadicTuples1.ts(397,7): error TS2322: Type '[false, false]' is not assignable to type '[...number[], boolean]'.
39+
tests/cases/conformance/types/tuple/variadicTuples1.ts(397,7): error TS2322: Type '[boolean, false]' is not assignable to type '[...number[], boolean]'.
4040
Type at position 0 in source is not compatible with type at position 0 in target.
4141
Type 'boolean' is not assignable to type 'number'.
4242

@@ -498,7 +498,7 @@ tests/cases/conformance/types/tuple/variadicTuples1.ts(397,7): error TS2322: Typ
498498
type Unbounded = [...Numbers, boolean];
499499
const data: Unbounded = [false, false]; // Error
500500
~~~~
501-
!!! error TS2322: Type '[false, false]' is not assignable to type '[...number[], boolean]'.
501+
!!! error TS2322: Type '[boolean, false]' is not assignable to type '[...number[], boolean]'.
502502
!!! error TS2322: Type at position 0 in source is not compatible with type at position 0 in target.
503503
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
504504

tests/baselines/reference/variadicTuples1.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ type Unbounded = [...Numbers, boolean];
13971397

13981398
const data: Unbounded = [false, false]; // Error
13991399
>data : [...number[], boolean]
1400-
>[false, false] : [false, false]
1400+
>[false, false] : [boolean, false]
14011401
>false : false
14021402
>false : false
14031403

tests/baselines/reference/variadicTuples2.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tests/cases/conformance/types/tuple/variadicTuples2.ts(74,5): error TS2322: Type
4545
tests/cases/conformance/types/tuple/variadicTuples2.ts(79,5): error TS2322: Type '[number, string, ...any[]]' is not assignable to type '[number, ...number[]]'.
4646
Type at positions 1 through 2 in source is not compatible with type at position 1 in target.
4747
Type 'string' is not assignable to type 'number'.
48-
tests/cases/conformance/types/tuple/variadicTuples2.ts(111,16): error TS2345: Argument of type '[1, 2, 3, 4]' is not assignable to parameter of type '[...number[], (...values: number[]) => void]'.
48+
tests/cases/conformance/types/tuple/variadicTuples2.ts(111,16): error TS2345: Argument of type '[1, 2, 3, number]' is not assignable to parameter of type '[...number[], (...values: number[]) => void]'.
4949
Type at position 3 in source is not compatible with type at position 1 in target.
5050
Type 'number' is not assignable to type '(...values: number[]) => void'.
5151
tests/cases/conformance/types/tuple/variadicTuples2.ts(112,6): error TS2345: Argument of type 'string[]' is not assignable to parameter of type '[...string[], (...values: string[]) => void]'.
@@ -245,7 +245,7 @@ tests/cases/conformance/types/tuple/variadicTuples2.ts(134,25): error TS2345: Ar
245245

246246
pipe<number[]>(1, 2, 3, 4); // Error
247247
~~~~~~~~~~
248-
!!! error TS2345: Argument of type '[1, 2, 3, 4]' is not assignable to parameter of type '[...number[], (...values: number[]) => void]'.
248+
!!! error TS2345: Argument of type '[1, 2, 3, number]' is not assignable to parameter of type '[...number[], (...values: number[]) => void]'.
249249
!!! error TS2345: Type at position 3 in source is not compatible with type at position 1 in target.
250250
!!! error TS2345: Type 'number' is not assignable to type '(...values: number[]) => void'.
251251
pipe(...sa); // Error

0 commit comments

Comments
 (0)