Title: `isNaN` and `isFinite` should accept number or string · Issue #4002 · microsoft/TypeScript · GitHub
Open Graph Title: `isNaN` and `isFinite` should accept number or string · Issue #4002 · microsoft/TypeScript
X Title: `isNaN` and `isFinite` should accept number or string · Issue #4002 · microsoft/TypeScript
Description: According to the ES5.1 spec (15.1.2.4, 15.1.2.5), isNaN(number) and isFinite(number) perform the ToNumber(number) abstract operation before checking if number coerces to NaN or ±Infinity. To me, this implies that the argument to these fu...
Open Graph Description: According to the ES5.1 spec (15.1.2.4, 15.1.2.5), isNaN(number) and isFinite(number) perform the ToNumber(number) abstract operation before checking if number coerces to NaN or ±Infinity. To me, th...
X Description: According to the ES5.1 spec (15.1.2.4, 15.1.2.5), isNaN(number) and isFinite(number) perform the ToNumber(number) abstract operation before checking if number coerces to NaN or ±Infinity. To me, th...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/4002
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`isNaN` and `isFinite` should accept number or string","articleBody":"According to the ES5.1 spec (15.1.2.4, 15.1.2.5), `isNaN(number)` and `isFinite(number)` perform the `ToNumber(number)` abstract operation before checking if `number` coerces to `NaN` or `±Infinity`.\n\nTo me, this implies that the argument to these functions can be any type. I think TypeScript should follow this as well. Why check if a variable is a number before checking if it's not a number (NaN)? Why manually coerce a variable into a number before calling a function that, according to the specification, does just that?\n","author":{"url":"https://github.com/darrylring","@type":"Person","name":"darrylring"},"datePublished":"2015-07-23T16:46:16Z","url":"https://github.com/microsoft/TypeScript/issues/4002"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:46203728-d25e-b066-dd3b-c1e8998eda5b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E436:3CBB3E:29B3A7F:353E013:6B01EA04 |
| html-safe-nonce | 4c60fcfa3a60fb326eba69b6a8f1430b4ab2ab28134664b1c459f16f7b7699c1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDM2OjNDQkIzRToyOUIzQTdGOjM1M0UwMTM6NkIwMUVBMDQiLCJ2aXNpdG9yX2lkIjoiNTgyMjM3MTg2NzEzODMyMDkwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0ce7493692b9b8daba6d9e9ab082b7a83599d466f058ebd7d8913468e3c29eb1 |
| hovercard-subject-tag | issue:96856251 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/4002/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d968a306575eaa7ed9eef0710d24634eebb781f816b0c5cae2138eea384b9d60/microsoft/TypeScript/issues/4002 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d968a306575eaa7ed9eef0710d24634eebb781f816b0c5cae2138eea384b9d60/microsoft/TypeScript/issues/4002 |
| og:image:alt | According to the ES5.1 spec (15.1.2.4, 15.1.2.5), isNaN(number) and isFinite(number) perform the ToNumber(number) abstract operation before checking if number coerces to NaN or ±Infinity. To me, th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | darrylring |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width