Added overload for 'String#match' to take objects with '[Symbol.match]' method.

This commit is contained in:
Daniel Rosenwasser
2015-08-19 15:02:13 -07:00
parent bd9d2de115
commit 4dd701a22c
+8
View File
@@ -425,6 +425,14 @@ interface String {
*/
startsWith(searchString: string, position?: number): boolean;
// Overloads for objects with methods of well-known symbols.
/**
* Matches a string an object that supports being matched against, and returns an array containing the results of that search.
* @param regexpLike An object that supports being matched against.
*/
match(regexpLike: { [Symbol.match](string: string): RegExpMatchArray; }): RegExpMatchArray;
/**
* Returns an <a> HTML anchor element and sets the name attribute to the text value
* @param name