mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-24 11:29:30 +08:00
lodash: signatures of the method _.escapeRegExp changed
This commit is contained in:
+14
-2
@@ -3555,8 +3555,20 @@ result = <string>_.escape('fred, barney, & pebbles');
|
||||
result = <string>_('fred, barney, & pebbles').escape();
|
||||
|
||||
// _.escapeRegExp
|
||||
result = <string>_.escapeRegExp('[lodash](https://lodash.com/)');
|
||||
result = <string>_('[lodash](https://lodash.com/)').escapeRegExp();
|
||||
module TestEscapeRegExp {
|
||||
{
|
||||
let result: string;
|
||||
|
||||
result = _.escapeRegExp('[lodash](https://lodash.com/)');
|
||||
result = _('[lodash](https://lodash.com/)').escapeRegExp();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _('[lodash](https://lodash.com/)').chain().escapeRegExp();
|
||||
}
|
||||
}
|
||||
|
||||
// _.kebabCase
|
||||
result = <string>_.kebabCase('Foo Bar');
|
||||
|
||||
Vendored
+8
@@ -9048,6 +9048,7 @@ declare module _ {
|
||||
/**
|
||||
* Escapes the RegExp special characters "\", "/", "^", "$", ".", "|", "?", "*", "+", "(", ")", "[", "]",
|
||||
* "{" and "}" in string.
|
||||
*
|
||||
* @param string The string to escape.
|
||||
* @return Returns the escaped string.
|
||||
*/
|
||||
@@ -9061,6 +9062,13 @@ declare module _ {
|
||||
escapeRegExp(): string;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.escapeRegExp
|
||||
*/
|
||||
escapeRegExp(): LoDashExplicitWrapper<string>;
|
||||
}
|
||||
|
||||
//_.kebabCase
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user