Recently, I defined an enum
as shown below:
enum EventType {
JOB,
JOB_EXECUTION,
JOB_GROUP
}
Now, I am in need of creating an interface structure like this:
interface EventConfigurations {
JOB: {
Enabled?: boolean;
};
JOB_EXECUTION: {
Enabled?: boolean;
};
JOB_GROUP: {
Enabled?: boolean;
};
}
Since there is a direct mapping between the two, I am curious if there is a way to automatically generate the interface based on the enum instead of hardcoding it manually. Any suggestions or insights are greatly appreciated!