File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -302,13 +302,13 @@ interface String {
302
302
* Matches a string with a regular expression, and returns an array containing the results of that search.
303
303
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
304
304
*/
305
- match ( regexp : string ) : string [ ] ;
305
+ match ( regexp : string ) : RegExpMatchArray ;
306
306
307
307
/**
308
308
* Matches a string with a regular expression, and returns an array containing the results of that search.
309
309
* @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
310
310
*/
311
- match ( regexp : RegExp ) : string [ ] ;
311
+ match ( regexp : RegExp ) : RegExpMatchArray ;
312
312
313
313
/**
314
314
* Replaces text in a string, using a regular expression or search string.
@@ -775,12 +775,16 @@ declare var Date: {
775
775
now ( ) : number ;
776
776
}
777
777
778
+ interface RegExpMatchArray extends Array < string > {
779
+ index ?: number ;
780
+ input ?: string ;
781
+ }
782
+
778
783
interface RegExpExecArray extends Array < string > {
779
784
index : number ;
780
785
input : string ;
781
786
}
782
787
783
-
784
788
interface RegExp {
785
789
/**
786
790
* Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
You can’t perform that action at this time.
0 commit comments