drafted types for repeating

This commit is contained in:
Claas Ahlrichs
2019-03-31 11:09:20 +02:00
parent cb8b1195e1
commit 2ce437c426
3 changed files with 18 additions and 3 deletions

View File

@@ -1,9 +1,15 @@
// Type definitions for repeating 3.0
// Project: https://github.com/sindresorhus/repeating#readme
// Definitions by: My Self <https://github.com/me>
// Definitions by: Claas Ahlrichs <https://github.com/claasahl>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = repeating;
declare function repeating(n: any, str: any): any;
/**
* Repeat a string - fast
*
* @param count Times the 'string' should be repeated.
* @param str String to repeat. Default: ' '
*/
declare function repeating(count: number, str?: string): string;

View File

@@ -0,0 +1,7 @@
import repeat from "repeating";
repeating(5);
//=> ' '
repeating(3, 'unicorn ');
//=> 'unicorn unicorn unicorn '

View File

@@ -7,13 +7,15 @@
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true
},
"files": [
"index.d.ts",