diff --git a/types/chunk/chunk-tests.ts b/types/chunk/chunk-tests.ts new file mode 100644 index 0000000000..05fe628be9 --- /dev/null +++ b/types/chunk/chunk-tests.ts @@ -0,0 +1,5 @@ +import chunk = require('chunk'); + +chunk([1, 2, 3]); +chunk([1, 2, 3], 1); +chunk([1, 2, 3], 3); diff --git a/types/chunk/index.d.ts b/types/chunk/index.d.ts new file mode 100644 index 0000000000..96deef885e --- /dev/null +++ b/types/chunk/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for chunk 0.0 +// Project: https://github.com/ryancole/chunk +// Definitions by: Florian Keller +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace chunk; + +declare function chunk(array: ArrayLike, size?: number): T[][]; + +export = chunk; diff --git a/types/chunk/tsconfig.json b/types/chunk/tsconfig.json new file mode 100644 index 0000000000..ecdb194f1c --- /dev/null +++ b/types/chunk/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "chunk-tests.ts" + ] +} diff --git a/types/chunk/tslint.json b/types/chunk/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/chunk/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }