diff --git a/tests/baselines/reference/controlFlowBinaryOrExpression.types b/tests/baselines/reference/controlFlowBinaryOrExpression.types index d97c45731c1..8e43d387653 100644 --- a/tests/baselines/reference/controlFlowBinaryOrExpression.types +++ b/tests/baselines/reference/controlFlowBinaryOrExpression.types @@ -76,7 +76,7 @@ if (isNodeList(sourceObj)) { if (isHTMLCollection(sourceObj)) { >isHTMLCollection(sourceObj) : boolean >isHTMLCollection : (sourceObj: any) => sourceObj is HTMLCollection ->sourceObj : NodeList | HTMLCollection | { a: string; } +>sourceObj : EventTargetLike sourceObj.length; >sourceObj.length : number @@ -88,7 +88,7 @@ if (isNodeList(sourceObj) || isHTMLCollection(sourceObj)) { >isNodeList(sourceObj) || isHTMLCollection(sourceObj) : boolean >isNodeList(sourceObj) : boolean >isNodeList : (sourceObj: any) => sourceObj is NodeList ->sourceObj : NodeList | HTMLCollection | { a: string; } +>sourceObj : EventTargetLike >isHTMLCollection(sourceObj) : boolean >isHTMLCollection : (sourceObj: any) => sourceObj is HTMLCollection >sourceObj : { a: string; } diff --git a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types index 1ded4612a41..fd3858baebc 100644 --- a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types +++ b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types @@ -86,7 +86,7 @@ function f2() { >Array.isArray : (arg: any) => arg is any[] >Array : ArrayConstructor >isArray : (arg: any) => arg is any[] ->elOrA : string | false | (string | false)[] +>elOrA : (string | false) | (string | false)[] >elOrA : (string | false)[] >[elOrA] : (string | false)[] >elOrA : string | false diff --git a/tests/baselines/reference/narrowTypeByInstanceof.types b/tests/baselines/reference/narrowTypeByInstanceof.types index 8119b7e7688..65b706eea76 100644 --- a/tests/baselines/reference/narrowTypeByInstanceof.types +++ b/tests/baselines/reference/narrowTypeByInstanceof.types @@ -59,7 +59,7 @@ if (elementA instanceof FileMatch && elementB instanceof FileMatch) { } else if (elementA instanceof Match && elementB instanceof Match) { >elementA instanceof Match && elementB instanceof Match : boolean >elementA instanceof Match : boolean ->elementA : Match | FileMatch +>elementA : FileMatchOrMatch >Match : typeof Match >elementB instanceof Match : boolean >elementB : FileMatchOrMatch diff --git a/tests/baselines/reference/stringLiteralTypesInUnionTypes04.types b/tests/baselines/reference/stringLiteralTypesInUnionTypes04.types index 3e29dffb891..030b55c5e99 100644 --- a/tests/baselines/reference/stringLiteralTypesInUnionTypes04.types +++ b/tests/baselines/reference/stringLiteralTypesInUnionTypes04.types @@ -22,7 +22,7 @@ if (x === "") { if (x !== "") { >x !== "" : boolean ->x : "" | "foo" +>x : T >"" : "" let b = x; @@ -32,7 +32,7 @@ if (x !== "") { if (x == "") { >x == "" : boolean ->x : "" | "foo" +>x : T >"" : "" let c = x; @@ -42,7 +42,7 @@ if (x == "") { if (x != "") { >x != "" : boolean ->x : "" | "foo" +>x : T >"" : "" let d = x; @@ -51,7 +51,7 @@ if (x != "") { } if (x) { ->x : "" | "foo" +>x : T let e = x; >e : "foo" @@ -60,17 +60,17 @@ if (x) { if (!x) { >!x : boolean ->x : "" | "foo" +>x : T let f = x; ->f : "" | "foo" ->x : "" | "foo" +>f : T +>x : T } if (!!x) { >!!x : boolean >!x : boolean ->x : "" | "foo" +>x : T let g = x; >g : "foo" @@ -81,9 +81,9 @@ if (!!!x) { >!!!x : boolean >!!x : boolean >!x : boolean ->x : "" | "foo" +>x : T let h = x; ->h : "" | "foo" ->x : "" | "foo" +>h : T +>x : T } diff --git a/tests/baselines/reference/stringLiteralTypesTypePredicates01.types b/tests/baselines/reference/stringLiteralTypesTypePredicates01.types index 9dafe9d461a..918679081a6 100644 --- a/tests/baselines/reference/stringLiteralTypesTypePredicates01.types +++ b/tests/baselines/reference/stringLiteralTypesTypePredicates01.types @@ -47,7 +47,7 @@ if (!kindIs(x, "B")) { >!kindIs(x, "B") : boolean >kindIs(x, "B") : boolean >kindIs : { (kind: Kind, is: "A"): kind is "A"; (kind: Kind, is: "B"): kind is "B"; } ->x : "A" | "B" +>x : Kind >"B" : "B" let c = x; diff --git a/tests/baselines/reference/tryCatchFinallyControlFlow.types b/tests/baselines/reference/tryCatchFinallyControlFlow.types index 6c3a5452652..1674907b3a2 100644 --- a/tests/baselines/reference/tryCatchFinallyControlFlow.types +++ b/tests/baselines/reference/tryCatchFinallyControlFlow.types @@ -630,14 +630,14 @@ function notallowed(arg: number) { state.tag; >state.tag : "one" | "two" | "three" ->state : { tag: "one"; } | { tag: "two"; } | { tag: "three"; } +>state : State >tag : "one" | "two" | "three" if (state.tag !== "one" && state.tag !== "two") { >state.tag !== "one" && state.tag !== "two" : boolean >state.tag !== "one" : boolean >state.tag : "one" | "two" | "three" ->state : { tag: "one"; } | { tag: "two"; } | { tag: "three"; } +>state : State >tag : "one" | "two" | "three" >"one" : "one" >state.tag !== "two" : boolean diff --git a/tests/baselines/reference/typeGuardsAsAssertions.types b/tests/baselines/reference/typeGuardsAsAssertions.types index cbd98f0b962..4139c84f77d 100644 --- a/tests/baselines/reference/typeGuardsAsAssertions.types +++ b/tests/baselines/reference/typeGuardsAsAssertions.types @@ -53,7 +53,7 @@ export function fn(makeSome: () => r): void { >cond : boolean result; // Some | None ->result : None | Some +>result : Optional result = someFrom(isSome(result) ? result.some : makeSome()); >result = someFrom(isSome(result) ? result.some : makeSome()) : { some: r; } @@ -63,7 +63,7 @@ export function fn(makeSome: () => r): void { >isSome(result) ? result.some : makeSome() : r >isSome(result) : boolean >isSome : (value: Optional) => value is Some ->result : None | Some +>result : Optional >result.some : r >result : Some >some : r diff --git a/tests/baselines/reference/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.types b/tests/baselines/reference/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.types index dd08f8d2ce1..7938c5ec6e1 100644 --- a/tests/baselines/reference/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.types +++ b/tests/baselines/reference/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.types @@ -92,9 +92,9 @@ class SomeClass2 { let n: number = this.state?.data; // This should be an error >n : number >this.state?.data : string | number ->this.state : { type: "numberVariant"; data: number; } | { type: "stringVariant"; data: string; } +>this.state : State >this : this ->state : { type: "numberVariant"; data: number; } | { type: "stringVariant"; data: string; } +>state : State >data : string | number } }