mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #6622 from chrootsu/lodash-trimRight
lodash: signatures of the method _.trimRight have been changed
This commit is contained in:
+20
-5
@@ -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 {
|
||||
|
||||
Vendored
+12
-1
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user