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
Error:(17, 40) TS2339: Property 'length' does not exist on type 'string | number'.
Property 'length' does not exist on type 'number'.
Error:(21, 40) TS2339: Property 'toExponential' does not exist on type 'string | number'.
Property 'toExponential' does not exist on type 'string'.
ahejlsberg
changed the title
Tagged union not narrowed with switch when unreachable or inside while condition
Switch over discriminated union inside while loop is broken
Oct 8, 2018
TypeScript Version: 3.2.0-dev.20181002
Search Terms: tagged/discriminated unions unreachable/conditions
Code
Expected behavior:
No errors
Actual behavior:
Code
Expected behavior:
No errors
Actual behavior:
Playground Link:
Playground
Related Issues:
Not found
The text was updated successfully, but these errors were encountered: