mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
25 lines
451 B
TypeScript
25 lines
451 B
TypeScript
//// [tests/cases/conformance/controlFlow/controlFlowElementAccess.ts] ////
|
|
|
|
//// [controlFlowElementAccess.ts]
|
|
let x: { o: boolean } = { o: false }
|
|
if (x['o'] === false) {
|
|
x['o'] = true
|
|
}
|
|
|
|
const y: [number, number] = [0, 0];
|
|
if (y[0] === 0) {
|
|
y[0] = -1;
|
|
}
|
|
|
|
|
|
//// [controlFlowElementAccess.js]
|
|
"use strict";
|
|
let x = { o: false };
|
|
if (x['o'] === false) {
|
|
x['o'] = true;
|
|
}
|
|
const y = [0, 0];
|
|
if (y[0] === 0) {
|
|
y[0] = -1;
|
|
}
|