mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-08 11:10:03 +00:00
drafted types for repeating
This commit is contained in:
10
types/repeating/index.d.ts
vendored
10
types/repeating/index.d.ts
vendored
@@ -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;
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import repeat from "repeating";
|
||||
|
||||
repeating(5);
|
||||
//=> ' '
|
||||
|
||||
repeating(3, 'unicorn ');
|
||||
//=> 'unicorn unicorn unicorn '
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user