Merge pull request #6622 from chrootsu/lodash-trimRight

lodash: signatures of the method _.trimRight have been changed
This commit is contained in:
Masahiro Wakame
2015-11-05 23:12:31 +09:00
2 changed files with 32 additions and 6 deletions
+20 -5
View File
@@ -5184,11 +5184,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
@@ -10754,11 +10754,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> {
@@ -10768,6 +10772,13 @@ declare module _ {
trimRight(chars?: string): string;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.trimRight
*/
trimRight(chars?: string): LoDashExplicitWrapper<string>;
}
//_.trunc
interface TruncOptions {
/** The maximum string length. */