Skip to content

Commit e4077ec

Browse files
Added the '[Symbol.search]' method to the 'RegExp' interface.
1 parent 9761810 commit e4077ec

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/lib/es6.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,14 @@ interface RegExp {
702702
*/
703703
[Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
704704

705+
/**
706+
* Finds the position beginning first substring match in a regular expression search
707+
* using this regular expression.
708+
*
709+
* @param string The string to search within.
710+
*/
711+
[Symbol.search](string: string): number;
712+
705713
/**
706714
* Returns a string indicating the flags of the regular expression in question. This field is read-only.
707715
* The characters in this string are sequenced and concatenated in the following order:

0 commit comments

Comments
 (0)