Hi,
I have an object that has an Enum as key. The Enum values get eventualy compiled to number in JS.
I'd like to be able to specify this:
var mapping: { [mappingKey: MappingKey]: string; }
(MappingKey is Enum)
This doesn't work and throws compile errors.
Specifying mappingKey: number is not the correct behavior, as I would be able to do this in TS code then:
mapping[5] // this should throw compile error
This is a bit related to this issue:
#1415
Hi,
I have an object that has an Enum as key. The Enum values get eventualy compiled to number in JS.
I'd like to be able to specify this:
var mapping: { [mappingKey: MappingKey]: string; }(MappingKey is Enum)
This doesn't work and throws compile errors.
Specifying
mappingKey: numberis not the correct behavior, as I would be able to do this in TS code then:mapping[5] // this should throw compile errorThis is a bit related to this issue:
#1415