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
The issue is that IfBlocks have a special <var>.constructor === <class> handling that isn't mirrored in switch blocks
The issues mentioned by @MartinJohns are not related to switch blocks
TypeScript Version: 4.2.0-dev.20201127
Search Terms: switch, narrow, constructor
Code
Expected behavior: Both functions narrow the value to
any[]
Actual behavior: Switch fails to narrow value
Playground Link: playground
Related Issues: #2214 (comment), #32774
The text was updated successfully, but these errors were encountered: