From 7c9a6b2f1dc8c3748b063eb43e47f78dc232dd9a Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Sat, 24 Oct 2015 23:41:11 +0500 Subject: [PATCH] lodash: signatures of the method _.repeat changed --- lodash/lodash-tests.ts | 19 +++++++++++++++++-- lodash/lodash.d.ts | 13 ++++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index c083edd4cf..0bb9dcb10e 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -3593,8 +3593,23 @@ result = _('08').parseInt(); result = _('08').parseInt(10); // _.repeat -result = _.repeat('*', 3); -result = _('*').repeat(3); +module TestRepeat { + { + let result: string; + result = _.repeat('*'); + result = _.repeat('*', 3); + + result = _('*').repeat(); + result = _('*').repeat(3); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _('*').chain().repeat(); + result = _('*').chain().repeat(3); + } +} // _.snakeCase result = _.snakeCase('Foo Bar'); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 8811243289..bbc1b69f87 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -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 { @@ -9177,6 +9181,13 @@ declare module _ { repeat(n?: number): string; } + interface LoDashExplicitWrapper { + /** + * @see _.repeat + */ + repeat(n?: number): LoDashExplicitWrapper; + } + //_.snakeCase interface LoDashStatic { /**