I\'m trying to use the following pattern:
enum Option {
ONE = \'one\',
TWO = \'two\',
THREE = \'three\'
}
interface OptionRequirement {
someBool: bo
Instead of using an interface, use a mapped object type
enum Option {
ONE = 'one',
TWO = 'two',
THREE = 'three'
}
type OptionKeys = keyof typeof Option;
interface OptionRequirement {
someBool: boolean;
someString: string;
}
type OptionRequirements = { // note type, not interface
[key in OptionKeys]: OptionRequirement; // key in
}