TypeScript/tests/cases/compiler/regexMatchAll.ts

6 lines
140 B
TypeScript
Raw Normal View History

2019-04-25 23:11:50 +02:00
// @target: es2020
const matches = /\w/g[Symbol.matchAll]("matchAll");
const array = [...matches];
const { index, input } = array[0];