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

This commit is contained in:
Ilya Mochalov
2015-11-05 08:44:30 +05:00
parent 001ca36ba5
commit 96e043516b
2 changed files with 31 additions and 6 deletions
+19 -5
View File
@@ -4899,11 +4899,25 @@ module TestTemplate {
}
// _.trim
result = <string>_.trim();
result = <string>_.trim(' abc ');
result = <string>_.trim('-_-abc-_-', '_-');
result = <string>_('-_-abc-_-').trim();
result = <string>_('-_-abc-_-').trim('_-');
module TestTrim {
{
let result: string;
result = _.trim();
result = _.trim(' abc ');
result = _.trim('-_-abc-_-', '_-');
result = _('-_-abc-_-').trim();
result = _('-_-abc-_-').trim('_-');
}
{
let result: _.LoDashExplicitWrapper<string>;
result = _('-_-abc-_-').chain().trim();
result = _('-_-abc-_-').chain().trim('_-');
}
}
// _.trimLeft
module TestTrimLeft {
+12 -1
View File
@@ -10459,11 +10459,15 @@ declare module _ {
interface LoDashStatic {
/**
* Removes leading and trailing whitespace or specified characters from string.
*
* @param string The string to trim.
* @param chars The characters to trim.
* @return Returns the trimmed string.
*/
trim(string?: string, chars?: string): string;
trim(
string?: string,
chars?: string
): string;
}
interface LoDashImplicitWrapper<T> {
@@ -10473,6 +10477,13 @@ declare module _ {
trim(chars?: string): string;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.trim
*/
trim(chars?: string): LoDashExplicitWrapper<string>;
}
//_.trimLeft
interface LoDashStatic {
/**