mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 06:50:19 +00:00
Adds type definitions for the npm module "is-function"
This commit is contained in:
Vendored
+8
@@ -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;
|
||||
@@ -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!";
|
||||
});
|
||||
@@ -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"]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user