mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
390 B
TypeScript
19 lines
390 B
TypeScript
//// [tests/cases/compiler/firstMatchRegExpMatchArray.ts] ////
|
|
|
|
//// [firstMatchRegExpMatchArray.ts]
|
|
const match = ''.match(/ /)
|
|
|
|
if (match !== null) {
|
|
const foo: string = match[0]
|
|
const bar: string = match[1]
|
|
}
|
|
|
|
|
|
//// [firstMatchRegExpMatchArray.js]
|
|
"use strict";
|
|
const match = ''.match(/ /);
|
|
if (match !== null) {
|
|
const foo = match[0];
|
|
const bar = match[1];
|
|
}
|