Adds type definitions for the npm module "is-function"

This commit is contained in:
Evangelos Zotos 2019-01-20 02:57:48 +01:00
parent d2defa0da5
commit 45f9d40964
4 changed files with 34 additions and 0 deletions

8
types/is-function/index.d.ts vendored Normal file
View 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;

View 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!";
});

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

View File

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