Skip to content

Commit

Permalink
add the deprecated mw.RegExp
Browse files Browse the repository at this point in the history
Co-authored-by: 安忆 <[email protected]>
  • Loading branch information
siddharthvp and AnYiEE committed Jan 6, 2024
1 parent 024fa7e commit 8be5da5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions mw/RegExp.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
declare global {
namespace mw {
/**
* @class mw.RegExp
* @see https://doc.wikimedia.org/mediawiki-core/REL1_29/js/source/mediawiki.RegExp.html
*/
namespace RegExp {
/**
* Escape string for safe inclusion in regular expression
*
* The following characters are escaped:
*
* \ { } ( ) | . ? * + - ^ $ [ ]
*
* @deprecated
* @since 1.26; deprecated since 1.34
* @param {string} str String to escape
* @return {string} Escaped string
* @see https://doc.wikimedia.org/mediawiki-core/REL1_29/js/source/mediawiki.RegExp.html#mw-RegExp-static-method-escape
*/
function escape(str: string): string;
}
}
}

export {};
1 change: 1 addition & 0 deletions mw/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import "./log";
import "./Map";
import "./message";
import "./notification";
import "./RegExp";
import "./Rest";
import "./storage";
import "./template";
Expand Down

0 comments on commit 8be5da5

Please sign in to comment.