Skip to content

Commit 82904f0

Browse files
committed
baselines
1 parent dbbc3ae commit 82904f0

4 files changed

+10
-12
lines changed

tests/baselines/reference/controlFlowOptionalChain.types

+2-2
Original file line numberDiff line numberDiff line change
@@ -2057,11 +2057,11 @@ while (arr[i]?.tag === "left") {
20572057

20582058
if (arr[i]?.tag === "right") {
20592059
>arr[i]?.tag === "right" : boolean
2060-
>arr[i]?.tag : "left" | "right"
2060+
>arr[i]?.tag : "left"
20612061
>arr[i] : { tag: "left" | "right"; }
20622062
>arr : { tag: "left" | "right"; }[]
20632063
>i : number
2064-
>tag : "left" | "right"
2064+
>tag : "left"
20652065
>"right" : "right"
20662066

20672067
console.log("I should ALSO be reachable");

tests/baselines/reference/incrementOnNullAssertion.types

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ if (foo[x] === undefined) {
2727
}
2828
else {
2929
let nu = foo[x]
30-
>nu : number | undefined
31-
>foo[x] : number | undefined
30+
>nu : number
31+
>foo[x] : number
3232
>foo : Dictionary<number>
3333
>x : "bar"
3434

3535
let n = foo[x]
36-
>n : number | undefined
37-
>foo[x] : number | undefined
36+
>n : number
37+
>foo[x] : number
3838
>foo : Dictionary<number>
3939
>x : "bar"
4040

4141
foo[x]!++
4242
>foo[x]!++ : number
4343
>foo[x]! : number
44-
>foo[x] : number | undefined
44+
>foo[x] : number
4545
>foo : Dictionary<number>
4646
>x : "bar"
4747
}

tests/baselines/reference/noUncheckedIndexedAccess.errors.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts(90,7): error TS2322
3232
Type 'undefined' is not assignable to type 'string'.
3333
tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts(98,5): error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'.
3434
Type 'undefined' is not assignable to type 'string'.
35-
tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'.
36-
Type 'undefined' is not assignable to type 'string'.
35+
tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'undefined' is not assignable to type 'string'.
3736

3837

3938
==== tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts (31 errors) ====
@@ -201,8 +200,7 @@ tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts(99,11): error TS232
201200
!!! error TS2322: Type 'undefined' is not assignable to type 'string'.
202201
const v: string = myRecord2[key]; // Should error
203202
~
204-
!!! error TS2322: Type 'string | undefined' is not assignable to type 'string'.
205-
!!! error TS2322: Type 'undefined' is not assignable to type 'string'.
203+
!!! error TS2322: Type 'undefined' is not assignable to type 'string'.
206204
};
207205

208206

tests/baselines/reference/noUncheckedIndexedAccess.types

+1-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ const fn3 = <Key extends keyof typeof myRecord2>(key: Key) => {
412412

413413
const v: string = myRecord2[key]; // Should error
414414
>v : string
415-
>myRecord2[key] : string | undefined
415+
>myRecord2[key] : undefined
416416
>myRecord2 : { [key: string]: string; a: string; b: string; }
417417
>key : Key
418418

0 commit comments

Comments
 (0)