Skip to content

Commit 4a78047

Browse files
committed
Accept new baselines
1 parent e6efb15 commit 4a78047

11 files changed

+21
-21
lines changed

tests/baselines/reference/arrayconcat.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class parser {
4646
>this : this
4747
>options : IOptions[]
4848
>sort : (compareFn?: (a: IOptions, b: IOptions) => number) => IOptions[]
49-
>function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } } : (a: IOptions, b: IOptions) => 0 | 1 | -1
49+
>function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } } : (a: IOptions, b: IOptions) => 1 | -1 | 0
5050
>a : IOptions
5151
>b : IOptions
5252

tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var derived2: Derived2;
3030

3131
var r2 = true ? 1 : '';
3232
>r2 : string | number
33-
>true ? 1 : '' : "" | 1
33+
>true ? 1 : '' : 1 | ""
3434
>true : true
3535
>1 : 1
3636
>'' : ""

tests/baselines/reference/computedPropertyNamesContextualType6_ES5.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ declare function foo<T>(obj: I<T>): T
1919
foo({
2020
>foo({ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : string | number | boolean | (() => void) | number[]
2121
>foo : <T>(obj: I<T>) => T
22-
>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: true | "" | 0 | (() => void) | number[]; [x: number]: 0 | (() => void) | number[]; 0: () => void; p: ""; }
22+
>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: true | "" | (() => void) | 0 | number[]; [x: number]: (() => void) | 0 | number[]; 0: () => void; p: ""; }
2323

2424
p: "",
2525
>p : string

tests/baselines/reference/computedPropertyNamesContextualType6_ES6.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ declare function foo<T>(obj: I<T>): T
1919
foo({
2020
>foo({ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : string | number | boolean | (() => void) | number[]
2121
>foo : <T>(obj: I<T>) => T
22-
>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: true | "" | 0 | (() => void) | number[]; [x: number]: 0 | (() => void) | number[]; 0: () => void; p: ""; }
22+
>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: true | "" | (() => void) | 0 | number[]; [x: number]: (() => void) | 0 | number[]; 0: () => void; p: ""; }
2323

2424
p: "",
2525
>p : string
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2322: Type '"" | 1' is not assignable to type 'boolean'.
2-
Type '""' is not assignable to type 'boolean'.
1+
tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2322: Type '1 | ""' is not assignable to type 'boolean'.
2+
Type '1' is not assignable to type 'boolean'.
33

44

55
==== tests/cases/compiler/conditionalExpression1.ts (1 errors) ====
66
var x: boolean = (true ? 1 : ""); // should be an error
77
~
8-
!!! error TS2322: Type '"" | 1' is not assignable to type 'boolean'.
9-
!!! error TS2322: Type '""' is not assignable to type 'boolean'.
8+
!!! error TS2322: Type '1 | ""' is not assignable to type 'boolean'.
9+
!!! error TS2322: Type '1' is not assignable to type 'boolean'.

tests/baselines/reference/conditionalExpressions2.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var b = false ? undefined : 0;
1616

1717
var c = false ? 1 : 0;
1818
>c : number
19-
>false ? 1 : 0 : 0 | 1
19+
>false ? 1 : 0 : 1 | 0
2020
>false : false
2121
>1 : 1
2222
>0 : 0

tests/baselines/reference/declFileTypeAnnotationParenType.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var y = [() => new c()];
2525
var k: (() => c) | string = (() => new c()) || "";
2626
>k : string | (() => c)
2727
>c : c
28-
>(() => new c()) || "" : "" | (() => c)
28+
>(() => new c()) || "" : (() => c) | ""
2929
>(() => new c()) : () => c
3030
>() => new c() : () => c
3131
>new c() : c

tests/baselines/reference/functionWithMultipleReturnStatements.types

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// it is an error if there is no single BCT, these are error cases
55

66
function f1() {
7-
>f1 : () => "" | 1
7+
>f1 : () => 1 | ""
88

99
if (true) {
1010
>true : true
@@ -19,7 +19,7 @@ function f1() {
1919
}
2020

2121
function f2() {
22-
>f2 : () => "" | 1 | 2
22+
>f2 : () => 1 | "" | 2
2323

2424
if (true) {
2525
>true : true
@@ -40,7 +40,7 @@ function f2() {
4040
}
4141

4242
function f3() {
43-
>f3 : () => "" | 1
43+
>f3 : () => 1 | ""
4444

4545
try {
4646
return 1;
@@ -55,7 +55,7 @@ function f3() {
5555
}
5656

5757
function f4() {
58-
>f4 : () => "" | 1
58+
>f4 : () => 1 | ""
5959

6060
try {
6161
return 1;
@@ -72,7 +72,7 @@ function f4() {
7272
}
7373

7474
function f5() {
75-
>f5 : () => "" | 1
75+
>f5 : () => 1 | ""
7676

7777
return 1;
7878
>1 : 1

tests/baselines/reference/literalTypes2.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ function f6() {
482482
const { c1 = true, c2 = 0, c3 = "foo" } = { c1: false, c2: 1, c3: "bar" };
483483
>c1 : boolean
484484
>true : true
485-
>c2 : 0 | 1
485+
>c2 : 1 | 0
486486
>0 : 0
487487
>c3 : "foo" | "bar"
488488
>"foo" : "foo"
@@ -552,10 +552,10 @@ class C2 {
552552
>0 : 0
553553
}
554554
bar() {
555-
>bar : () => 0 | 1
555+
>bar : () => 1 | 0
556556

557557
return cond ? 0 : 1;
558-
>cond ? 0 : 1 : 0 | 1
558+
>cond ? 0 : 1 : 1 | 0
559559
>cond : boolean
560560
>0 : 0
561561
>1 : 1

tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,14 @@ function f6<T extends String>(x: T) {
259259

260260
var r2 = true ? '' : x; // ok
261261
>r2 : string | T
262-
>true ? '' : x : "" | T
262+
>true ? '' : x : T | ""
263263
>true : true
264264
>'' : ""
265265
>x : T
266266

267267
var r2 = true ? x : ''; // ok
268268
>r2 : string | T
269-
>true ? x : '' : "" | T
269+
>true ? x : '' : T | ""
270270
>true : true
271271
>x : T
272272
>'' : ""

tests/baselines/reference/underscoreTest1.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ _.compact([0, 1, false, 2, '', 3]);
512512
>_.compact : <T>(list: T[]) => T[]
513513
>_ : Underscore.Static
514514
>compact : <T>(list: T[]) => T[]
515-
>[0, 1, false, 2, '', 3] : (false | "" | 0 | 1 | 2 | 3)[]
515+
>[0, 1, false, 2, '', 3] : (false | 1 | 2 | 3 | 0 | "")[]
516516
>0 : 0
517517
>1 : 1
518518
>false : false

0 commit comments

Comments
 (0)