From 98e197e942300961c2350dd5671303e9f1507eae Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Sun, 25 Oct 2015 23:48:34 +0500 Subject: [PATCH] lodash: signatures of the method _.trimLeft 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 c083edd4c..28a98f051 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -3639,11 +3639,25 @@ result = _('-_-abc-_-').trim(); result = _('-_-abc-_-').trim('_-'); // _.trimLeft -result = _.trimLeft(); -result = _.trimLeft(' abc '); -result = _.trimLeft('-_-abc-_-', '_-'); -result = _('-_-abc-_-').trimLeft(); -result = _('-_-abc-_-').trimLeft('_-'); +module TestTrimLeft { + { + let result: string; + + result = _.trimLeft(); + result = _.trimLeft(' abc '); + result = _.trimLeft('-_-abc-_-', '_-'); + + result = _('-_-abc-_-').trimLeft(); + result = _('-_-abc-_-').trimLeft('_-'); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _('-_-abc-_-').chain().trimLeft(); + result = _('-_-abc-_-').chain().trimLeft('_-'); + } +} // _.trimRight result = _.trimRight(); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 881124328..64e7d5458 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -9296,11 +9296,15 @@ declare module _ { interface LoDashStatic { /** * Removes leading whitespace or specified characters from string. + * * @param string The string to trim. * @param chars The characters to trim. * @return Returns the trimmed string. */ - trimLeft(string?: string, chars?: string): string; + trimLeft( + string?: string, + chars?: string + ): string; } interface LoDashImplicitWrapper { @@ -9310,6 +9314,13 @@ declare module _ { trimLeft(chars?: string): string; } + interface LoDashExplicitWrapper { + /** + * @see _.trimLeft + */ + trimLeft(chars?: string): LoDashExplicitWrapper; + } + //_.trimRight interface LoDashStatic { /**