Open
Description
🔎 Search Terms
"NaN"
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
i got the same output for every version in the typescript playground, except 3.3.3 where as const
is not supported. without as const
this gets typed as just number
⏯ Playground Link
💻 Code
const nan = NaN && 1 as const;
🙁 Actual behavior
It gets typed as 0 | 1
. (See .d.ts output in playground)
🙂 Expected behavior
It should get number
or a more specific type.
Additional information about the issue
NaN
is falsy in javascript, !!NaN === false
Metadata
Metadata
Assignees
Labels
No labels