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
No, current behavior is correct. Unions are sum types. You don't know which variant of the union this value represents. Need to perform "case" matching on it (so called "pattern matching") to know that. You are asking to reduce the type-safety.
Bug Report
π Search Terms
Object union
π Version & Regression Information
4.4.0-dev.20210526
β― Playground Link
Will add one later, writing this on my phone
π» Code
π Actual behavior
The type is narrowed to the intersection of the two types, making it impossible to narrow it without casting it
π Expected behavior
It should narrow to something like
The text was updated successfully, but these errors were encountered: