Add types for chunk (#35164)

This commit is contained in:
Florian Keller
2019-05-02 20:04:14 -07:00
committed by Wesley Wigham
parent 5b2467f7ea
commit 4ec0684aba
4 changed files with 39 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
import chunk = require('chunk');
chunk([1, 2, 3]);
chunk([1, 2, 3], 1);
chunk([1, 2, 3], 3);
+10
View File
@@ -0,0 +1,10 @@
// Type definitions for chunk 0.0
// Project: https://github.com/ryancole/chunk
// Definitions by: Florian Keller <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export as namespace chunk;
declare function chunk<T>(array: ArrayLike<T>, size?: number): T[][];
export = chunk;
+23
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }