diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index abe109c6e..7d1bf4bf8 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -4927,11 +4927,26 @@ module TestTrimLeft { } // _.trimRight -result = _.trimRight(); -result = _.trimRight(' abc '); -result = _.trimRight('-_-abc-_-', '_-'); -result = _('-_-abc-_-').trimRight(); -result = _('-_-abc-_-').trimRight('_-'); + +module TestTrimRight { + { + let result: string; + + result = _.trimRight(); + result = _.trimRight(' abc '); + result = _.trimRight('-_-abc-_-', '_-'); + + result = _('-_-abc-_-').trimRight(); + result = _('-_-abc-_-').trimRight('_-'); + } + + { + let result: _.LoDashExplicitWrapper; + + result = _('-_-abc-_-').chain().trimRight(); + result = _('-_-abc-_-').chain().trimRight('_-'); + } +} // _.trunc module TestTrunc { diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 7f20d7aa8..bf821d22b 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -10506,11 +10506,15 @@ declare module _ { interface LoDashStatic { /** * Removes trailing whitespace or specified characters from string. + * * @param string The string to trim. * @param chars The characters to trim. * @return Returns the trimmed string. */ - trimRight(string?: string, chars?: string): string; + trimRight( + string?: string, + chars?: string + ): string; } interface LoDashImplicitWrapper { @@ -10520,6 +10524,13 @@ declare module _ { trimRight(chars?: string): string; } + interface LoDashExplicitWrapper { + /** + * @see _.trimRight + */ + trimRight(chars?: string): LoDashExplicitWrapper; + } + //_.trunc interface TruncOptions { /** The maximum string length. */