mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 05:41:22 -06:00
Fix build in the presence of definite assignment analysis (#20170)
This commit is contained in:
parent
005838f6df
commit
e684f30d18
@ -23,7 +23,7 @@ function f2<T extends C, U extends D>(v: T | U) {
|
||||
}
|
||||
}
|
||||
|
||||
class E { x: string }
|
||||
class E { x: string | undefined }
|
||||
|
||||
function f3<T extends E>(v: T | { x: string }) {
|
||||
if (v instanceof E) {
|
||||
|
||||
@ -57,12 +57,12 @@ function f2<T extends C, U extends D>(v: T | U) {
|
||||
}
|
||||
}
|
||||
|
||||
class E { x: string }
|
||||
class E { x: string | undefined }
|
||||
>E : Symbol(E, Decl(narrowingConstrainedTypeVariable.ts, 22, 1))
|
||||
>x : Symbol(E.x, Decl(narrowingConstrainedTypeVariable.ts, 24, 9))
|
||||
|
||||
function f3<T extends E>(v: T | { x: string }) {
|
||||
>f3 : Symbol(f3, Decl(narrowingConstrainedTypeVariable.ts, 24, 21))
|
||||
>f3 : Symbol(f3, Decl(narrowingConstrainedTypeVariable.ts, 24, 33))
|
||||
>T : Symbol(T, Decl(narrowingConstrainedTypeVariable.ts, 26, 12))
|
||||
>E : Symbol(E, Decl(narrowingConstrainedTypeVariable.ts, 22, 1))
|
||||
>v : Symbol(v, Decl(narrowingConstrainedTypeVariable.ts, 26, 25))
|
||||
|
||||
@ -59,9 +59,9 @@ function f2<T extends C, U extends D>(v: T | U) {
|
||||
}
|
||||
}
|
||||
|
||||
class E { x: string }
|
||||
class E { x: string | undefined }
|
||||
>E : E
|
||||
>x : string
|
||||
>x : string | undefined
|
||||
|
||||
function f3<T extends E>(v: T | { x: string }) {
|
||||
>f3 : <T extends E>(v: T | { x: string; }) => void
|
||||
|
||||
@ -24,7 +24,7 @@ function f2<T extends C, U extends D>(v: T | U) {
|
||||
}
|
||||
}
|
||||
|
||||
class E { x: string }
|
||||
class E { x: string | undefined }
|
||||
|
||||
function f3<T extends E>(v: T | { x: string }) {
|
||||
if (v instanceof E) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user