-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Expand file tree
/
Copy pathstringMatchAll.types
More file actions
39 lines (35 loc) · 1.28 KB
/
stringMatchAll.types
File metadata and controls
39 lines (35 loc) · 1.28 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
33
34
35
36
37
38
39
//// [tests/cases/compiler/stringMatchAll.ts] ////
=== stringMatchAll.ts ===
const matches = "matchAll".matchAll(/\w/g);
>matches : RegExpStringIterator<RegExpExecArray>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>"matchAll".matchAll(/\w/g) : RegExpStringIterator<RegExpExecArray>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>"matchAll".matchAll : (regexp: RegExp) => RegExpStringIterator<RegExpExecArray>
> : ^ ^^ ^^^^^
>"matchAll" : "matchAll"
> : ^^^^^^^^^^
>matchAll : (regexp: RegExp) => RegExpStringIterator<RegExpExecArray>
> : ^ ^^ ^^^^^
>/\w/g : RegExp
> : ^^^^^^
const array = [...matches];
>array : RegExpExecArray[]
> : ^^^^^^^^^^^^^^^^^
>[...matches] : RegExpExecArray[]
> : ^^^^^^^^^^^^^^^^^
>...matches : RegExpExecArray
> : ^^^^^^^^^^^^^^^
>matches : RegExpStringIterator<RegExpExecArray>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
const { index, input } = array[0];
>index : number
> : ^^^^^^
>input : string
> : ^^^^^^
>array[0] : RegExpExecArray
> : ^^^^^^^^^^^^^^^
>array : RegExpExecArray[]
> : ^^^^^^^^^^^^^^^^^
>0 : 0
> : ^