diff --git a/types/isarray/index.d.ts b/types/isarray/index.d.ts new file mode 100644 index 0000000000..8466d6cbd6 --- /dev/null +++ b/types/isarray/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for isarray 2.0 +// Project: https://github.com/juliangruber/isarray +// Definitions by: Claas Ahlrichs +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.7 + +export = isarray; + +declare function isarray(p0: any): boolean; diff --git a/types/isarray/isarray-tests.ts b/types/isarray/isarray-tests.ts new file mode 100644 index 0000000000..d29f7761d2 --- /dev/null +++ b/types/isarray/isarray-tests.ts @@ -0,0 +1,4 @@ +import isArray from "isarray"; + +isArray([]); // => true +isArray({}); // => false diff --git a/types/isarray/tsconfig.json b/types/isarray/tsconfig.json new file mode 100644 index 0000000000..66483911c6 --- /dev/null +++ b/types/isarray/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "isarray-tests.ts" + ] +} diff --git a/types/isarray/tslint.json b/types/isarray/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/isarray/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }