mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Merge pull request #6427 from chrootsu/lodash-repeat
lodash: signatures of the method _.repeat changed
This commit is contained in:
+17
-2
@@ -3839,8 +3839,23 @@ result = <number>_('08').parseInt();
|
||||
result = <number>_('08').parseInt(10);
|
||||
|
||||
// _.repeat
|
||||
result = <string>_.repeat('*', 3);
|
||||
result = <string>_('*').repeat(3);
|
||||
module TestRepeat {
|
||||
{
|
||||
let result: string;
|
||||
result = _.repeat('*');
|
||||
result = _.repeat('*', 3);
|
||||
|
||||
result = _('*').repeat();
|
||||
result = _('*').repeat(3);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _('*').chain().repeat();
|
||||
result = _('*').chain().repeat(3);
|
||||
}
|
||||
}
|
||||
|
||||
// _.snakeCase
|
||||
result = <string>_.snakeCase('Foo Bar');
|
||||
|
||||
Vendored
+12
-1
@@ -9281,11 +9281,15 @@ declare module _ {
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* 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;
|
||||
repeat(
|
||||
string?: string,
|
||||
n?: number
|
||||
): string;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapper<T> {
|
||||
@@ -9295,6 +9299,13 @@ declare module _ {
|
||||
repeat(n?: number): string;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.repeat
|
||||
*/
|
||||
repeat(n?: number): LoDashExplicitWrapper<string>;
|
||||
}
|
||||
|
||||
//_.snakeCase
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user