mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-25 12:00:38 +08:00
lodash: signatures of the method _.repeat changed
This commit is contained in:
1 parent
3191f6e008
commit
7c9a6b2f1d
2 files changed
+29
-3
No files matched your search
+17
-2
@@ -3593,8 +3593,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
@@ -9163,11 +9163,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> {
|
||||
@@ -9177,6 +9181,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