Merge pull request #6427 from chrootsu/lodash-repeat

lodash: signatures of the method _.repeat changed
This commit is contained in:
Masahiro Wakame
2015-10-27 00:58:53 +09:00
2 changed files with 29 additions and 3 deletions
+17 -2
View File
@@ -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');
+12 -1
View File
@@ -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 {
/**