Enum de tecla de objeto TypeScript
// Since 2018, there is an easier way in Typescript,
//without using keyof typeof:
let layer: { [key in MyEnum]: any}
// To not have to include all keys:
let layer: { [key in MyEnum]?: an
DevPedrada