is-integer: add type definitions.

This commit is contained in:
Daniel Cassidy 2019-03-08 13:00:14 +00:00
parent b32ee25977
commit 072ad7ac8b
4 changed files with 48 additions and 0 deletions

8
types/is-integer/index.d.ts vendored Normal file
View File

@ -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;

View File

@ -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({});

View File

@ -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"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }