diff --git a/tests/baselines/reference/controlFlowOptionalChain.types b/tests/baselines/reference/controlFlowOptionalChain.types index 4e335fca6d287..b144ef2954430 100644 --- a/tests/baselines/reference/controlFlowOptionalChain.types +++ b/tests/baselines/reference/controlFlowOptionalChain.types @@ -2057,11 +2057,11 @@ while (arr[i]?.tag === "left") { if (arr[i]?.tag === "right") { >arr[i]?.tag === "right" : boolean ->arr[i]?.tag : "left" | "right" +>arr[i]?.tag : "left" >arr[i] : { tag: "left" | "right"; } >arr : { tag: "left" | "right"; }[] >i : number ->tag : "left" | "right" +>tag : "left" >"right" : "right" console.log("I should ALSO be reachable"); diff --git a/tests/baselines/reference/incrementOnNullAssertion.types b/tests/baselines/reference/incrementOnNullAssertion.types index 0c7f5340b9f9a..199c4c87050f8 100644 --- a/tests/baselines/reference/incrementOnNullAssertion.types +++ b/tests/baselines/reference/incrementOnNullAssertion.types @@ -27,21 +27,21 @@ if (foo[x] === undefined) { } else { let nu = foo[x] ->nu : number | undefined ->foo[x] : number | undefined +>nu : number +>foo[x] : number >foo : Dictionary >x : "bar" let n = foo[x] ->n : number | undefined ->foo[x] : number | undefined +>n : number +>foo[x] : number >foo : Dictionary >x : "bar" foo[x]!++ >foo[x]!++ : number >foo[x]! : number ->foo[x] : number | undefined +>foo[x] : number >foo : Dictionary >x : "bar" } diff --git a/tests/baselines/reference/noUncheckedIndexedAccess.errors.txt b/tests/baselines/reference/noUncheckedIndexedAccess.errors.txt index 39a4e9aeb4442..ff6d730d3cdc9 100644 --- a/tests/baselines/reference/noUncheckedIndexedAccess.errors.txt +++ b/tests/baselines/reference/noUncheckedIndexedAccess.errors.txt @@ -32,8 +32,7 @@ tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts(90,7): error TS2322 Type 'undefined' is not assignable to type 'string'. 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]'. Type 'undefined' is not assignable to type 'string'. -tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. - Type 'undefined' is not assignable to type 'string'. +tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'undefined' is not assignable to type 'string'. ==== tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts (31 errors) ==== @@ -201,8 +200,7 @@ tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts(99,11): error TS232 !!! error TS2322: Type 'undefined' is not assignable to type 'string'. const v: string = myRecord2[key]; // Should error ~ -!!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. -!!! error TS2322: Type 'undefined' is not assignable to type 'string'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string'. }; \ No newline at end of file diff --git a/tests/baselines/reference/noUncheckedIndexedAccess.types b/tests/baselines/reference/noUncheckedIndexedAccess.types index 9dc76ff0d887a..e472de4eb5482 100644 --- a/tests/baselines/reference/noUncheckedIndexedAccess.types +++ b/tests/baselines/reference/noUncheckedIndexedAccess.types @@ -412,7 +412,7 @@ const fn3 = (key: Key) => { const v: string = myRecord2[key]; // Should error >v : string ->myRecord2[key] : string | undefined +>myRecord2[key] : undefined >myRecord2 : { [key: string]: string; a: string; b: string; } >key : Key