Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lib definition for isNaN wrong #19153

Closed
eseliger opened this issue Oct 13, 2017 · 2 comments
Closed

Lib definition for isNaN wrong #19153

eseliger opened this issue Oct 13, 2017 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@eseliger
Copy link

Code

isNaN(0)
isNaN('120')
isNaN(new Date())

Expected behavior:
isNaN should also take string and Date and pretty much everything, probably any
See here in the examples section

Actual behavior:
It only takes number https://github.com/Microsoft/TypeScript/blob/master/lib/lib.es5.d.ts#L53

@trotyl
Copy link

trotyl commented Oct 13, 2017

It's by design, see #3947, #4002, #11414, #13227, #15173, #16427.

@ghost ghost added the Duplicate An existing issue was already created label Oct 13, 2017
@RyanCavanaugh
Copy link
Member

@eseliger please do read the instructions and search for existing issues before logging new ones

image

@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants