Skip to content

Commit 5bbadb6

Browse files
committed
Accept new baselines
1 parent 8528dbe commit 5bbadb6

15 files changed

+24
-24
lines changed

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/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var i: I<string>;
1515
>I : I<T>
1616

1717
var y = i(""); // y should be string
18-
>y : string
18+
>y : ""
1919
>i("") : ""
2020
>i : I<string>
2121
>"" : ""

tests/baselines/reference/conditionalExpression1.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
=== tests/cases/compiler/conditionalExpression1.ts ===
22
var x: boolean = (true ? 1 : ""); // should be an error
33
>x : boolean
4-
>(true ? 1 : "") : 1 | ""
5-
>true ? 1 : "" : 1 | ""
4+
>(true ? 1 : "") : "" | 1
5+
>true ? 1 : "" : "" | 1
66
>true : true
77
>1 : 1
88
>"" : ""

tests/baselines/reference/conditionalExpressions2.types

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

1616
var c = false ? 1 : 0;
1717
>c : number
18-
>false ? 1 : 0 : 1 | 0
18+
>false ? 1 : 0 : 0 | 1
1919
>false : false
2020
>1 : 1
2121
>0 : 0

tests/baselines/reference/conditionalOperatorWithIdenticalBCT.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ var result10: (t: X) => any = true ? (m) => m.propertyX1 : (n) => n.propertyX2;
218218
//Expr1 and Expr2 are literals
219219
var result11: any = true ? 1 : 'string';
220220
>result11 : any
221-
>true ? 1 : 'string' : 1 | "string"
221+
>true ? 1 : 'string' : "string" | 1
222222
>true : true
223223
>1 : 1
224224
>'string' : "string"

tests/baselines/reference/conditionalTypes1.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,8 @@ function zeroOf<T extends number | string | boolean>(value: T) {
589589
><ZeroOf<T>>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false) : ZeroOf<T>
590590
>ZeroOf : ZeroOf<T>
591591
>T : T
592-
>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false) : false | 0 | ""
593-
>typeof value === "number" ? 0 : typeof value === "string" ? "" : false : false | 0 | ""
592+
>(typeof value === "number" ? 0 : typeof value === "string" ? "" : false) : false | "" | 0
593+
>typeof value === "number" ? 0 : typeof value === "string" ? "" : false : false | "" | 0
594594
>typeof value === "number" : boolean
595595
>typeof value : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
596596
>value : T

tests/baselines/reference/declFileTypeAnnotationParenType.types

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

tests/baselines/reference/literalTypes2.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ class C2 {
555555
>bar : () => 1 | 0
556556

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

tests/baselines/reference/literalTypes3.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function f5(x: number, y: 1 | 2) {
107107
>y : 1 | 2
108108

109109
x; // 0 | 1 | 2
110-
>x : 1 | 2 | 0
110+
>x : 0 | 1 | 2
111111
}
112112
}
113113

@@ -126,7 +126,7 @@ function f6(x: number, y: 1 | 2) {
126126
>x : number
127127

128128
x; // 0 | 1 | 2
129-
>x : 1 | 2 | 0
129+
>x : 0 | 1 | 2
130130
}
131131
}
132132

tests/baselines/reference/newExpressionWithTypeParameterConstrainedToOuterTypeParameter.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var i: I<string>;
1515
>I : I<T>
1616

1717
var y = new i(""); // y should be string
18-
>y : string
18+
>y : ""
1919
>new i("") : ""
2020
>i : I<string>
2121
>"" : ""

tests/baselines/reference/parserArgumentList1.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function removeClass (node:HTMLElement, className:string) {
2626
>rightDelimiter : any
2727

2828
return leftDelimiter.length + rightDelimiter.length === 2 ? ' ' : '';
29-
>leftDelimiter.length + rightDelimiter.length === 2 ? ' ' : '' : " " | ""
29+
>leftDelimiter.length + rightDelimiter.length === 2 ? ' ' : '' : "" | " "
3030
>leftDelimiter.length + rightDelimiter.length === 2 : boolean
3131
>leftDelimiter.length + rightDelimiter.length : any
3232
>leftDelimiter.length : any

tests/baselines/reference/subtypesOfTypeParameter.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ function f2<T, U>(x: T, y: U) {
144144

145145
var r2 = true ? '' : x;
146146
>r2 : string | T
147-
>true ? '' : x : T | ""
147+
>true ? '' : x : "" | T
148148
>true : true
149149
>'' : ""
150150
>x : T
151151

152152
var r2 = true ? x : '';
153153
>r2 : string | T
154-
>true ? x : '' : T | ""
154+
>true ? x : '' : "" | T
155155
>true : true
156156
>x : T
157157
>'' : ""

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/uniqueSymbols.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -699,19 +699,19 @@ g(N["s"]);
699699

700700
// falsy expressions
701701
s || "";
702-
>s || "" : unique symbol | ""
702+
>s || "" : "" | unique symbol
703703
>s : unique symbol
704704
>"" : ""
705705

706706
N.s || "";
707-
>N.s || "" : unique symbol | ""
707+
>N.s || "" : "" | unique symbol
708708
>N.s : unique symbol
709709
>N : typeof N
710710
>s : unique symbol
711711
>"" : ""
712712

713713
N["s"] || "";
714-
>N["s"] || "" : unique symbol | ""
714+
>N["s"] || "" : "" | unique symbol
715715
>N["s"] : unique symbol
716716
>N : typeof N
717717
>"s" : "s"

tests/baselines/reference/uniqueSymbolsDeclarations.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -699,19 +699,19 @@ g(N["s"]);
699699

700700
// falsy expressions
701701
s || "";
702-
>s || "" : unique symbol | ""
702+
>s || "" : "" | unique symbol
703703
>s : unique symbol
704704
>"" : ""
705705

706706
N.s || "";
707-
>N.s || "" : unique symbol | ""
707+
>N.s || "" : "" | unique symbol
708708
>N.s : unique symbol
709709
>N : typeof N
710710
>s : unique symbol
711711
>"" : ""
712712

713713
N["s"] || "";
714-
>N["s"] || "" : unique symbol | ""
714+
>N["s"] || "" : "" | unique symbol
715715
>N["s"] : unique symbol
716716
>N : typeof N
717717
>"s" : "s"

0 commit comments

Comments
 (0)