mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
lodash: changed _.repeat() method
This commit is contained in:
@@ -1768,14 +1768,16 @@ result = <string>_('abc').padRight();
|
||||
result = <string>_('abc').padRight(6);
|
||||
result = <string>_('abc').padRight(6, '_-');
|
||||
|
||||
result = <string>_.repeat('*', 3);
|
||||
|
||||
// _.parseInt
|
||||
result = <number>_.parseInt('08');
|
||||
result = <number>_.parseInt('08', 10);
|
||||
result = <number>_('08').parseInt();
|
||||
result = <number>_('08').parseInt(10);
|
||||
|
||||
// _.repeat
|
||||
result = <string>_.repeat('*', 3);
|
||||
result = <string>_('*').repeat(3);
|
||||
|
||||
// _.snakeCase
|
||||
result = <string>_.snakeCase('Foo Bar');
|
||||
result = <string>_('Foo Bar').snakeCase();
|
||||
|
||||
Vendored
+15
-1
@@ -7672,8 +7672,22 @@ declare module _ {
|
||||
parseInt(radix?: number): number;
|
||||
}
|
||||
|
||||
//_.repeat
|
||||
interface LoDashStatic {
|
||||
repeat(str?: string, n?: number): string;
|
||||
/**
|
||||
* Repeats the given string n times.
|
||||
* @param string The string to repeat.
|
||||
* @param n The number of times to repeat the string.
|
||||
* @return Returns the repeated string.
|
||||
*/
|
||||
repeat(string?: string, n?: number): string;
|
||||
}
|
||||
|
||||
interface LoDashWrapper<T> {
|
||||
/**
|
||||
* @see _.repeat
|
||||
*/
|
||||
repeat(n?: number): string;
|
||||
}
|
||||
|
||||
//_.snakeCase
|
||||
|
||||
Reference in New Issue
Block a user