TypeScript/tests/cases/conformance/expressions/elementAccess/stringEnumInElementAccess01.ts
2017-08-24 14:06:21 -07:00

16 lines
235 B
TypeScript

// @noImplicitAny: true
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];