mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
is-integer: add type definitions.
This commit is contained in:
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// Type definitions for is-integer 1.0
|
||||
// Project: https://github.com/parshap/js-is-integer#readme
|
||||
// Definitions by: Daniel Cassidy <https://github.com/djcsdy>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function isInteger(val: any): boolean;
|
||||
|
||||
export = isInteger;
|
||||
@@ -0,0 +1,16 @@
|
||||
import isInteger = require("is-integer");
|
||||
|
||||
// $ExpectType boolean
|
||||
isInteger("hello");
|
||||
|
||||
// $ExpectType boolean
|
||||
isInteger(4);
|
||||
|
||||
// $ExpectType boolean
|
||||
isInteger(4.0);
|
||||
|
||||
// $ExpectType boolean
|
||||
isInteger(4.1);
|
||||
|
||||
// $ExpectType boolean
|
||||
isInteger({});
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"is-integer-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user