mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
Merge pull request #32316 from evangeloszotos/master
Adds type definitions for the npm module "is-function"
This commit is contained in:
7
types/is-function/index.d.ts
vendored
Normal file
7
types/is-function/index.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// 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
|
||||
|
||||
export = isFunction;
|
||||
declare function isFunction(fn: any): boolean;
|
||||
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 isFunction = require("is-function");
|
||||
|
||||
const a: boolean = isFunction("string");
|
||||
const b: boolean = isFunction(true);
|
||||
const c: boolean = isFunction((x: number) => x * x);
|
||||
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" }
|
||||
Reference in New Issue
Block a user