mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Adds type definitions for the npm module "is-function"
This commit is contained in:
parent
d2defa0da5
commit
45f9d40964
8
types/is-function/index.d.ts
vendored
Normal file
8
types/is-function/index.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
// Type definitions for is-function 1.0
|
||||
// Project: https://github.com/grncdr/js-is-function
|
||||
// Definitions by: Evangelos Zotos <https://github.com/evangeloszotos>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function isFunction(fn: any): boolean;
|
||||
declare namespace isFunction {}
|
||||
export = isFunction;
|
||||
9
types/is-function/is-function-tests.ts
Normal file
9
types/is-function/is-function-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import * as isFunction from "is-function";
|
||||
|
||||
const a: boolean = isFunction("string");
|
||||
const b: boolean = isFunction(true);
|
||||
const c: boolean = isFunction((a: number) => a * a);
|
||||
const d: boolean = isFunction({ type: "number" });
|
||||
const e: boolean = isFunction(() => {
|
||||
return "I am anounymous!";
|
||||
});
|
||||
16
types/is-function/tsconfig.json
Normal file
16
types/is-function/tsconfig.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": ["index.d.ts", "is-function-tests.ts"]
|
||||
}
|
||||
1
types/is-function/tslint.json
Normal file
1
types/is-function/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user