lodash: signatures of the method _.trimRight have been changed

This commit is contained in:
Ilya Mochalov
2015-11-05 08:53:43 +05:00
parent 001ca36ba5
commit 9dcd7c9635
2 changed files with 32 additions and 6 deletions
+20 -5
View File
@@ -4927,11 +4927,26 @@ module TestTrimLeft {
}
// _.trimRight
result = <string>_.trimRight();
result = <string>_.trimRight(' abc ');
result = <string>_.trimRight('-_-abc-_-', '_-');
result = <string>_('-_-abc-_-').trimRight();
result = <string>_('-_-abc-_-').trimRight('_-');
module TestTrimRight {
{
let result: string;
result = _.trimRight();
result = _.trimRight(' abc ');
result = _.trimRight('-_-abc-_-', '_-');
result = _('-_-abc-_-').trimRight();
result = _('-_-abc-_-').trimRight('_-');
}
{
let result: _.LoDashExplicitWrapper<string>;
result = _('-_-abc-_-').chain().trimRight();
result = _('-_-abc-_-').chain().trimRight('_-');
}
}
// _.trunc
module TestTrunc {
+12 -1
View File
@@ -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<T> {
@@ -10520,6 +10524,13 @@ declare module _ {
trimRight(chars?: string): string;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.trimRight
*/
trimRight(chars?: string): LoDashExplicitWrapper<string>;
}
//_.trunc
interface TruncOptions {
/** The maximum string length. */