Answers for "typescript key values interface key from enum"

0

typescript key values interface key from enum

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

let example: colorsInterface = {
    [colorsEnum.red]: true,
    [colorsEnum.blue]: false
};
Posted by: Guest on August-11-2021

Code answers related to "typescript key values interface key from enum"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language