1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
=== tests/cases/compiler/regexMatchAll.ts ===
const matches = /\w/g[Symbol.matchAll]("matchAll");
>matches : Symbol(matches, Decl(regexMatchAll.ts, 0, 5))
>Symbol.matchAll : Symbol(SymbolConstructor.matchAll, Decl(lib.es2020.symbol.wellknown.d.ts, --, --))
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --))
>matchAll : Symbol(SymbolConstructor.matchAll, Decl(lib.es2020.symbol.wellknown.d.ts, --, --))
const array = [...matches];
>array : Symbol(array, Decl(regexMatchAll.ts, 1, 5))
>matches : Symbol(matches, Decl(regexMatchAll.ts, 0, 5))
const { index, input } = array[0];
>index : Symbol(index, Decl(regexMatchAll.ts, 2, 7))
>input : Symbol(input, Decl(regexMatchAll.ts, 2, 14))
>array : Symbol(array, Decl(regexMatchAll.ts, 1, 5))
|