diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 4c6477669..35b94040d 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -3926,11 +3926,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 022ad395e..3ee0959db 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -9449,11 +9449,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 { @@ -9463,6 +9467,13 @@ declare module _ { trimLeft(chars?: string): string; } + interface LoDashExplicitWrapper { + /** + * @see _.trimLeft + */ + trimLeft(chars?: string): LoDashExplicitWrapper; + } + //_.trimRight interface LoDashStatic { /**