mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #6620 from chrootsu/lodash-trim
lodash: signatures of the method _.trim have been changed
This commit is contained in:
+19
-5
@@ -5142,11 +5142,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 {
|
||||
|
||||
Vendored
+12
-1
@@ -10696,11 +10696,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> {
|
||||
@@ -10710,6 +10714,13 @@ declare module _ {
|
||||
trim(chars?: string): string;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.trim
|
||||
*/
|
||||
trim(chars?: string): LoDashExplicitWrapper<string>;
|
||||
}
|
||||
|
||||
//_.trimLeft
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user