Skip to content

Commit

Permalink
fix #11670, support type guards in NumberConstructor (#11722)
Browse files Browse the repository at this point in the history
  • Loading branch information
HerringtonDarkholme authored and mhegazy committed Oct 19, 2016
1 parent 67873ca commit 4fbbbed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/es2015.core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,27 +205,27 @@ interface NumberConstructor {
* number. Only finite values of the type number, result in true.
* @param number A numeric value.
*/
isFinite(number: number): boolean;
isFinite(value: any): value is number;

/**
* Returns true if the value passed is an integer, false otherwise.
* @param number A numeric value.
*/
isInteger(number: number): boolean;
isInteger(value: any): value is number;

/**
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
* number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
* to a number. Only values of the type number, that are also NaN, result in true.
* @param number A numeric value.
*/
isNaN(number: number): boolean;
isNaN(value: any): value is number;

/**
* Returns true if the value passed is a safe integer.
* @param number A numeric value.
*/
isSafeInteger(number: number): boolean;
isSafeInteger(value: any): value is number;

/**
* The value of the largest integer n such that n and n + 1 are both exactly representable as
Expand Down

0 comments on commit 4fbbbed

Please sign in to comment.