Add type definitions for chunk-text (#36772)

This commit is contained in:
Malo Bourgon 2019-07-09 17:25:13 -07:00 committed by Armando Aguirre
parent bb95be8979
commit fbe126dfaa
4 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,3 @@
import chunk = require('chunk-text');
console.log(chunk('hello world how are you?', 7));

8
types/chunk-text/index.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
// Type definitions for chunk-text 1.0
// Project: https://github.com/algolia/chunk-text
// Definitions by: Malo Bourgon <https://github.com/malob>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = chunkText;
declare function chunkText(text: string, chunkSize: number): string[];

View File

@ -0,0 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"chunk-text-tests.ts"
]
}

View File

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