lodash: signatures of the method _.repeat changed

This commit is contained in:
Ilya Mochalov
2015-10-24 23:41:11 +05:00
parent 3191f6e008
commit 7c9a6b2f1d
2 changed files with 29 additions and 3 deletions
+17 -2
View File
@@ -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');
+12 -1
View File
@@ -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 {
/**