Skip to content

Commit 57a9a63

Browse files
committed
Accept new baselines
1 parent 7dd64d3 commit 57a9a63

7 files changed

+18
-18
lines changed

tests/baselines/reference/declFileTypeAnnotationStringLiteral.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function foo(a: string): string | number {
2323

2424
return a.length;
2525
>a.length : number
26-
>a : string
26+
>a : "hello"
2727
>length : number
2828
}
2929

tests/baselines/reference/literalTypes1.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function f4(x: 0 | 1 | true | string) {
129129
>"def" : "def"
130130

131131
x;
132-
>x : string
132+
>x : "abc" | "def"
133133

134134
break;
135135
case null:
@@ -163,7 +163,7 @@ function f5(x: string | number | boolean) {
163163
>"abc" : "abc"
164164

165165
x;
166-
>x : string
166+
>x : "abc"
167167

168168
break;
169169
case 0:
@@ -173,7 +173,7 @@ function f5(x: string | number | boolean) {
173173
>1 : 1
174174

175175
x;
176-
>x : number
176+
>x : 0 | 1
177177

178178
break;
179179
case true:
@@ -190,7 +190,7 @@ function f5(x: string | number | boolean) {
190190
>123 : 123
191191

192192
x;
193-
>x : string | number
193+
>x : "hello" | 123
194194

195195
break;
196196
default:

tests/baselines/reference/sourceMapValidationIfElse.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if (i == 10) {
1010

1111
i++;
1212
>i++ : number
13-
>i : number
13+
>i : 10
1414

1515
} else
1616
{
@@ -22,7 +22,7 @@ if (i == 10)
2222
{
2323
i++;
2424
>i++ : number
25-
>i : number
25+
>i : 10
2626
}
2727
else if (i == 20) {
2828
>i == 20 : boolean
@@ -31,7 +31,7 @@ else if (i == 20) {
3131

3232
i--;
3333
>i-- : number
34-
>i : number
34+
>i : 20
3535

3636
} else if (i == 30) {
3737
>i == 30 : boolean

tests/baselines/reference/sourceMapValidationSwitch.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ switch (x) {
1111

1212
x++;
1313
>x++ : number
14-
>x : number
14+
>x : 5
1515

1616
break;
1717
case 10:
1818
>10 : 10
1919
{
2020
x--;
2121
>x-- : number
22-
>x : number
22+
>x : 10
2323

2424
break;
2525
}
@@ -39,15 +39,15 @@ switch (x)
3939

4040
x++;
4141
>x++ : number
42-
>x : number
42+
>x : 5
4343

4444
break;
4545
case 10:
4646
>10 : 10
4747
{
4848
x--;
4949
>x-- : number
50-
>x : number
50+
>x : 10
5151

5252
break;
5353
}

tests/baselines/reference/sourceMapValidationWhile.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ while (a == 10) {
1010

1111
a++;
1212
>a++ : number
13-
>a : number
13+
>a : 10
1414
}
1515
while (a == 10)
1616
>a == 10 : boolean
@@ -19,5 +19,5 @@ while (a == 10)
1919
{
2020
a++;
2121
>a++ : number
22-
>a : number
22+
>a : 10
2323
}

tests/baselines/reference/stringLiteralTypesInUnionTypes02.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (x === "foo") {
1919

2020
let a = x;
2121
>a : string
22-
>x : string
22+
>x : "foo"
2323
}
2424
else if (x !== "bar") {
2525
>x !== "bar" : boolean
@@ -35,15 +35,15 @@ else if (x !== "bar") {
3535
else {
3636
let c = x;
3737
>c : string
38-
>x : string
38+
>x : "bar"
3939

4040
let d = y;
4141
>d : string
4242
>y : string
4343

4444
let e: (typeof x) | (typeof y) = c || d;
4545
>e : string
46-
>x : string
46+
>x : "bar"
4747
>y : string
4848
>c || d : string
4949
>c : string

tests/baselines/reference/throwInEnclosingStatements.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ switch (y) {
2525
>'a' : "a"
2626

2727
throw y;
28-
>y : string
28+
>y : "a"
2929

3030
default:
3131
throw y;

0 commit comments

Comments
 (0)