Files
DefinitelyTyped/types/is-number/index.d.ts
Jed Thompson 9c3af8d04e [is-number] Added num is number user defined type guard as r… (#36550)
* [is-number] Added user defined type guard

* [is-number] Added string to type guard
2019-07-01 11:08:01 -07:00

15 lines
601 B
TypeScript

// Type definitions for is-number 7.0
// Project: https://github.com/jonschlinkert/is-number
// Definitions by: Harry Shipton <https://github.com/harryshipton>
// Jed Thompson <https://github.com/jedster1111>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = is_number;
/**
* Will test to see if the argument is a valid number, excluding Infinity and NaN.
* @param num Any value that should be tested for being a number
* @returns true if the parameter is a valid number, otherwise false
*/
declare function is_number(num: any): num is number | string;