Skip to content

Commit eb29053

Browse files
committed
Fix baselines
1 parent 9549c23 commit eb29053

7 files changed

+18
-18
lines changed

tests/baselines/reference/arrayDestructuringInSwitch2.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function foo(x: X): 1 {
2222
const { kind, a } = x;
2323
>kind : "a" | "b"
2424
> : ^^^^^^^^^
25-
>a : [1] | []
25+
>a : [] | [1]
2626
> : ^^^^^^^^
2727
>x : X
2828
> : ^

tests/baselines/reference/classImplementsMethodWIthTupleArgs.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface Settable {
2424
set(...args: [option: Record<string, unknown>] | [name: string, value: unknown] | [name: string]): void;
2525
>set : (...args: [option: Record<string, unknown>] | [name: string, value: unknown] | [name: string]) => void
2626
> : ^^^^ ^^ ^^^^^
27-
>args : [option: Record<string, unknown>] | [name: string, value: unknown] | [name: string]
27+
>args : [name: string] | [option: Record<string, unknown>] | [name: string, value: unknown]
2828
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2929
}
3030

tests/baselines/reference/dependentDestructuredVariables.types

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ const f51: (...args: ['A', number] | ['B', string]) => void = (kind, payload) =>
930930
const f52: (...args: ['A', number] | ['B']) => void = (kind, payload?) => {
931931
>f52 : (...args: ["A", number] | ["B"]) => void
932932
> : ^^^^ ^^ ^^^^^
933-
>args : ["A", number] | ["B"]
933+
>args : ["B"] | ["A", number]
934934
> : ^^^^^^^^^^^^^^^^^^^^^
935935
>(kind, payload?) => { if (kind === 'A') { payload.toFixed(); } else { payload; // undefined }} : (kind: "A" | "B", payload?: number | undefined) => void
936936
> : ^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1159,7 +1159,7 @@ type FooMethod = {
11591159
method(...args:
11601160
>method : (...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]) => void
11611161
> : ^^^^ ^^ ^^^^^
1162-
>args : [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]
1162+
>args : [type: "num", cb: (e: number) => void] | [type: "str", cb: (e: string) => void]
11631163
> : ^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^
11641164

11651165
[type: "str", cb: (e: string) => void] |
@@ -1222,7 +1222,7 @@ type FooAsyncMethod = {
12221222
method(...args:
12231223
>method : (...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]) => Promise<any>
12241224
> : ^^^^ ^^ ^^^^^
1225-
>args : [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]
1225+
>args : [type: "num", cb: (e: number) => void] | [type: "str", cb: (e: string) => void]
12261226
> : ^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^
12271227

12281228
[type: "str", cb: (e: string) => void] |
@@ -1285,7 +1285,7 @@ type FooGenMethod = {
12851285
method(...args:
12861286
>method : (...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]) => Generator<any, any, any>
12871287
> : ^^^^ ^^ ^^^^^
1288-
>args : [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]
1288+
>args : [type: "num", cb: (e: number) => void] | [type: "str", cb: (e: string) => void]
12891289
> : ^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^
12901290

12911291
[type: "str", cb: (e: string) => void] |
@@ -1348,7 +1348,7 @@ type FooAsyncGenMethod = {
13481348
method(...args:
13491349
>method : (...args: [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]) => AsyncGenerator<any, any, any>
13501350
> : ^^^^ ^^ ^^^^^
1351-
>args : [type: "str", cb: (e: string) => void] | [type: "num", cb: (e: number) => void]
1351+
>args : [type: "num", cb: (e: number) => void] | [type: "str", cb: (e: string) => void]
13521352
> : ^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^
13531353

13541354
[type: "str", cb: (e: string) => void] |

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment5SiblingInitializer.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function f4() {
124124
> : ^^^^^^^^^^^^^^^^^^
125125
>a : number | undefined
126126
> : ^^^^^^^^^^^^^^^^^^
127-
>yadda ?? [] : [number, number] | []
127+
>yadda ?? [] : [] | [number, number]
128128
> : ^^^^^^^^^^^^^^^^^^^^^
129129
>yadda : [number, number] | undefined
130130
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/baselines/reference/destructuringAssignmentWithDefault.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,23 +239,23 @@ function f4(options?: [string, number]) {
239239
> : ^^^^^^^^^^^^^^^^^^
240240
>num : number | undefined
241241
> : ^^^^^^^^^^^^^^^^^^
242-
>options || [] : [string, number] | []
242+
>options || [] : [] | [string, number]
243243
> : ^^^^^^^^^^^^^^^^^^^^^
244244
>options : [string, number] | undefined
245245
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
246246
>[] : []
247247
> : ^^
248248

249249
[str, num] = options || [];
250-
>[str, num] = options || [] : [string, number] | []
250+
>[str, num] = options || [] : [] | [string, number]
251251
> : ^^^^^^^^^^^^^^^^^^^^^
252252
>[str, num] : [string | undefined, number | undefined]
253253
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
254254
>str : string | undefined
255255
> : ^^^^^^^^^^^^^^^^^^
256256
>num : number | undefined
257257
> : ^^^^^^^^^^^^^^^^^^
258-
>options || [] : [string, number] | []
258+
>options || [] : [] | [string, number]
259259
> : ^^^^^^^^^^^^^^^^^^^^^
260260
>options : [string, number] | undefined
261261
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/baselines/reference/genericRestParameters3.types

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ declare const t1: [string] | [number, boolean];
4242
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4343

4444
declare const t2: readonly [string] | [number, boolean];
45-
>t2 : readonly [string] | [number, boolean]
45+
>t2 : [number, boolean] | readonly [string]
4646
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4747

4848
declare const t3: [string] | readonly [number, boolean];
4949
>t3 : [string] | readonly [number, boolean]
5050
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5151

5252
declare const t4: readonly [string] | readonly [number, boolean];
53-
>t4 : readonly [number, boolean] | readonly [string]
53+
>t4 : readonly [string] | readonly [number, boolean]
5454
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5555

5656
f1("foo", "abc");
@@ -96,7 +96,7 @@ f1("foo", ...t2);
9696
> : ^^^^^
9797
>...t2 : string | number | boolean
9898
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
99-
>t2 : readonly [string] | [number, boolean]
99+
>t2 : [number, boolean] | readonly [string]
100100
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
101101

102102
f1("foo", ...t3);
@@ -120,7 +120,7 @@ f1("foo", ...t4);
120120
> : ^^^^^
121121
>...t4 : string | number | boolean
122122
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
123-
>t4 : readonly [number, boolean] | readonly [string]
123+
>t4 : readonly [string] | readonly [number, boolean]
124124
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125125

126126
f1("foo", 10); // Error
@@ -417,7 +417,7 @@ function ff3<A extends unknown[]>(s1: (...args: [x: string, ...rest: A | [number
417417
> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^
418418
>s1 : (...args: [x: string, ...rest: A | [number]]) => void
419419
> : ^^^^ ^^ ^^^^^
420-
>args : [x: string, ...rest: A] | [x: string, number]
420+
>args : [x: string, number] | [x: string, ...rest: A]
421421
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
422422
>s2 : (x: string, ...rest: A | [number]) => void
423423
> : ^ ^^ ^^^^^ ^^ ^^^^^

tests/baselines/reference/partiallyNamedTuples2.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ const matches = x.get(id1);
4949
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5050
>x.get(id1) : Iterable<[id2: string, object]>
5151
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52-
>x.get : <Key extends [id1: string, id2: string] | [id1: string] | []>(...key: Key) => GetResult<[id1: string, id2: string], Key, object>
52+
>x.get : <Key extends [] | [id1: string] | [id1: string, id2: string]>(...key: Key) => GetResult<[id1: string, id2: string], Key, object>
5353
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5454
>x : MultiKeyMap<[id1: string, id2: string], object>
5555
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56-
>get : <Key extends [id1: string, id2: string] | [id1: string] | []>(...key: Key) => GetResult<[id1: string, id2: string], Key, object>
56+
>get : <Key extends [] | [id1: string] | [id1: string, id2: string]>(...key: Key) => GetResult<[id1: string, id2: string], Key, object>
5757
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5858
>id1 : string
5959
> : ^^^^^^

0 commit comments

Comments
 (0)