From e4077ec0f8d39a3bc88aea504bda5a85ca9458ef Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 18 Aug 2015 15:01:58 -0700 Subject: [PATCH] Added the '[Symbol.search]' method to the 'RegExp' interface. --- src/lib/es6.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/es6.d.ts b/src/lib/es6.d.ts index aceac270f88..d590daf5d28 100644 --- a/src/lib/es6.d.ts +++ b/src/lib/es6.d.ts @@ -702,6 +702,14 @@ interface RegExp { */ [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; + /** + * Finds the position beginning first substring match in a regular expression search + * using this regular expression. + * + * @param string The string to search within. + */ + [Symbol.search](string: string): number; + /** * Returns a string indicating the flags of the regular expression in question. This field is read-only. * The characters in this string are sequenced and concatenated in the following order: