Merge pull request #6440 from chrootsu/lodash-trimLeft

lodash: signatures of the method _.trimLeft changed
This commit is contained in:
Masahiro Wakame
2015-10-27 00:59:39 +09:00
2 changed files with 31 additions and 6 deletions
+19 -5
View File
@@ -3926,11 +3926,25 @@ result = <string>_('-_-abc-_-').trim();
result = <string>_('-_-abc-_-').trim('_-');
// _.trimLeft
result = <string>_.trimLeft();
result = <string>_.trimLeft(' abc ');
result = <string>_.trimLeft('-_-abc-_-', '_-');
result = <string>_('-_-abc-_-').trimLeft();
result = <string>_('-_-abc-_-').trimLeft('_-');
module TestTrimLeft {
{
let result: string;
result = _.trimLeft();
result = _.trimLeft(' abc ');
result = _.trimLeft('-_-abc-_-', '_-');
result = _('-_-abc-_-').trimLeft();
result = _('-_-abc-_-').trimLeft('_-');
}
{
let result: _.LoDashExplicitWrapper<string>;
result = _('-_-abc-_-').chain().trimLeft();
result = _('-_-abc-_-').chain().trimLeft('_-');
}
}
// _.trimRight
result = <string>_.trimRight();
+12 -1
View File
@@ -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<T> {
@@ -9463,6 +9467,13 @@ declare module _ {
trimLeft(chars?: string): string;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.trimLeft
*/
trimLeft(chars?: string): LoDashExplicitWrapper<string>;
}
//_.trimRight
interface LoDashStatic {
/**