Files
tsgo/testdata/baselines/reference/submodule/conformance/stringEnumInElementAccess01.js

30 lines
528 B
TypeScript

//// [tests/cases/conformance/expressions/elementAccess/stringEnumInElementAccess01.ts] ////
//// [stringEnumInElementAccess01.ts]
enum E {
A = "a",
B = "b",
C = "c",
}
interface Item {
a: string;
b: number;
c: boolean;
}
declare const item: Item;
declare const e: E;
const snb: string | number | boolean = item[e];
//// [stringEnumInElementAccess01.js]
"use strict";
var E;
(function (E) {
E["A"] = "a";
E["B"] = "b";
E["C"] = "c";
})(E || (E = {}));
const snb = item[e];