TypeScript/tests/cases/compiler/enumIndexer.ts
2014-07-12 17:30:19 -07:00

7 lines
198 B
TypeScript

enum MyEnumType {
foo, bar
}
var _arr = [{ key: 'foo' }, { key: 'bar' }]
var enumValue = MyEnumType.foo;
var x = _arr.map(o => MyEnumType[o.key] === enumValue); // these are not same type