From 96e043516b624ac702fafb5048e873bc3658ec8b Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Thu, 5 Nov 2015 08:44:30 +0500 Subject: [PATCH] lodash: signatures of the method _.trim have been changed --- lodash/lodash-tests.ts | 24 +++++++++++++++++++----- lodash/lodash.d.ts | 13 ++++++++++++- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index abe109c6e..a38212fc0 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -4899,11 +4899,25 @@ module TestTemplate { } // _.trim -result = _.trim(); -result = _.trim(' abc '); -result = _.trim('-_-abc-_-', '_-'); -result = _('-_-abc-_-').trim(); -result = _('-_-abc-_-').trim('_-'); +module TestTrim { + { + let result: string; + + result = _.trim(); + result = _.trim(' abc '); + result = _.trim('-_-abc-_-', '_-'); + + result = _('-_-abc-_-').trim(); + result = _('-_-abc-_-').trim('_-'); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _('-_-abc-_-').chain().trim(); + result = _('-_-abc-_-').chain().trim('_-'); + } +} // _.trimLeft module TestTrimLeft { diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 7f20d7aa8..11b14d6f3 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -10459,11 +10459,15 @@ declare module _ { interface LoDashStatic { /** * Removes leading and trailing whitespace or specified characters from string. + * * @param string The string to trim. * @param chars The characters to trim. * @return Returns the trimmed string. */ - trim(string?: string, chars?: string): string; + trim( + string?: string, + chars?: string + ): string; } interface LoDashImplicitWrapper { @@ -10473,6 +10477,13 @@ declare module _ { trim(chars?: string): string; } + interface LoDashExplicitWrapper { + /** + * @see _.trim + */ + trim(chars?: string): LoDashExplicitWrapper; + } + //_.trimLeft interface LoDashStatic { /**