mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
is-integer: add type definitions.
This commit is contained in:
parent
b32ee25977
commit
072ad7ac8b
8
types/is-integer/index.d.ts
vendored
Normal file
8
types/is-integer/index.d.ts
vendored
Normal 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;
|
||||
16
types/is-integer/is-integer-tests.ts
Normal file
16
types/is-integer/is-integer-tests.ts
Normal 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({});
|
||||
23
types/is-integer/tsconfig.json
Normal file
23
types/is-integer/tsconfig.json
Normal 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"
|
||||
]
|
||||
}
|
||||
1
types/is-integer/tslint.json
Normal file
1
types/is-integer/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user