diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 00ca144fd2..8183c54a5c 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1768,14 +1768,16 @@ result = _('abc').padRight(); result = _('abc').padRight(6); result = _('abc').padRight(6, '_-'); -result = _.repeat('*', 3); - // _.parseInt result = _.parseInt('08'); result = _.parseInt('08', 10); result = _('08').parseInt(); result = _('08').parseInt(10); +// _.repeat +result = _.repeat('*', 3); +result = _('*').repeat(3); + // _.snakeCase result = _.snakeCase('Foo Bar'); result = _('Foo Bar').snakeCase(); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 77daeca2a1..5c57d76f36 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -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 { + /** + * @see _.repeat + */ + repeat(n?: number): string; } //_.snakeCase