forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathes2020.symbol.wellknown.d.ts
More file actions
32 lines (28 loc) · 1.16 KB
/
es2020.symbol.wellknown.d.ts
File metadata and controls
32 lines (28 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/// <reference lib="es2015.iterable" />
/// <reference lib="es2015.symbol" />
interface SymbolConstructor {
/**
* A regular expression method that matches the regular expression against a string. Called
* by the String.prototype.matchAll method.
*/
readonly matchAll: unique symbol;
}
interface RegExpStringIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): RegExpStringIterator<T>;
}
interface RegExp {
/**
* Matches a string with this regular expression, and returns an iterable of matches
* containing the results of that search.
* @param string A string to search within.
*/
[Symbol.matchAll](str: string): RegExpStringIterator<RegExpMatchArray>;
}
interface String {
/**
* Matches a string or an object that supports being matched against, and
* returns an iterable of matches containing the results of that search.
* @param regexp An object that supports being matched against.
*/
matchAll(matcher: { [Symbol.matchAll](str: string): RegExpStringIterator<RegExpMatchArray>; }): RegExpStringIterator<RegExpExecArray>;
}