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
I would expect data type to be refined in each case & for this code to check.
Actual behavior:
data type does not seems to get refined by switch cases, there for errors are reported when data is treated as number and as string:
Property 'toFixed' does not exist on type 'string | number | boolean'.
Property 'toFixed' does not exist on type 'string'.
Property 'toUpperCase' does not exist on type 'string | number | boolean'.
Property 'toUpperCase' does not exist on type 'number'.
The text was updated successfully, but these errors were encountered:
TypeScript Version: 2.3
Code
Expected behavior:
I would expect
data
type to be refined in each case & for this code to check.Actual behavior:
data
type does not seems to get refined by switch cases, there for errors are reported when data is treated as number and as string:The text was updated successfully, but these errors were encountered: