From 1e9b5e4c30c5c648e7913ad58bfc2ce7563b331c Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 18 Aug 2015 13:39:51 -0700 Subject: [PATCH] Added the '[Symbol.match]' method to the 'RegExp' interface. --- src/lib/es6.d.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib/es6.d.ts b/src/lib/es6.d.ts index d1efb7ce6dc..767060f9848 100644 --- a/src/lib/es6.d.ts +++ b/src/lib/es6.d.ts @@ -647,8 +647,8 @@ interface Date { } interface RegExp { - /** - * Matches a string with a regular expression, and returns an array containing the results of + /** + * Matches a string with this regular expression, and returns an array containing the results of * that search. * @param string A string to search within. */ @@ -678,6 +678,13 @@ interface RegExp { */ split(string: string, limit?: number): string[]; + /** + * Matches a string with this regular expression, and returns an array containing the results of + * that search. + * @param string A string to search within. + */ + [Symbol.match](str: string): RegExpMatchArray; + /** * 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: