TypeScript Kunci Nilai Antarmuka dari Enum

export type colorsInterface = {
    [key in colorsEnum]?: boolean;
};

let example: colorsInterface = {
    [colorsEnum.red]: true,
    [colorsEnum.blue]: false
};
Exuberant Emu