You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Narrowing is based on the parent control flow graph introducing a direct narrowing, rather than doing a sort of constraint-solving process as would be required to figure this one out. We don't intend to switch to the latter method since code that requires that sort of analysis is quite rare in practice.
Bug Report
π Search Terms
typenarrowing, null
π Version & Regression Information
This is the behavior in every version I tried, and I reviewed the FAQ for entries about null and narrowing
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Typescript doesn't narrow down the variables to be non-null at the end

π Expected behavior
Typescript should be able to narrow down the types to both be non-null
The text was updated successfully, but these errors were encountered: