mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
lodash: signatures of the method _.trimLeft changed
This commit is contained in:
+19
-5
@@ -3639,11 +3639,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();
|
||||
|
||||
Vendored
+12
-1
@@ -9296,11 +9296,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> {
|
||||
@@ -9310,6 +9314,13 @@ declare module _ {
|
||||
trimLeft(chars?: string): string;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.trimLeft
|
||||
*/
|
||||
trimLeft(chars?: string): LoDashExplicitWrapper<string>;
|
||||
}
|
||||
|
||||
//_.trimRight
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user