lodash: signatures of the method _.escapeRegExp changed

This commit is contained in:
Ilya Mochalov
2015-10-23 21:55:38 +05:00
parent 3191f6e008
commit 3a1be5666a
2 changed files with 22 additions and 2 deletions
+14 -2
View File
@@ -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');
+8
View File
@@ -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 {
/**