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
My compilation target is ES2015 and my lib is the default.
Missing / Incorrect Definition
Number.isFinite, Number.isInteger, Number.isNaN and Number.isSafeInteger
Sample Code
functionfoo(value: number|null|undefined){if(Number.isFinite(value)){bar(value)// value should be inferred as `number` here}}functionbar(value: number){
...
}
This is intentional and there are several existing issues regarding this. Type guards imply that the function matches for all values of the type, but that's not the case for these functions.
lib Update Request
Configuration Check
My compilation target is
ES2015
and my lib isthe default
.Missing / Incorrect Definition
Number.isFinite
,Number.isInteger
,Number.isNaN
andNumber.isSafeInteger
Sample Code
Documentation Link
Number.isFinite
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite
Number.isInteger
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger
Number.isNaN
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN
Number.isSafeInteger
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger
The text was updated successfully, but these errors were encountered: