An index signature parameter type cannot be a union type. Consider using a mapped object type instead
@lebyy▲ 0 net votes
Problem: I'm trying to use the following pattern: enum Option { ONE = 'one', TWO = 'two', THREE = 'three' } interface OptionRequirement { someBool: boolean; someString: s This seems very straightforward to me, however I get the following error: An index signature… Fix (from the top answer): You can use TS "in" operator and do this: enum Options { ONE = 'one', TWO = 'two', THREE = 'three', } interface OptionRequirement { someBool: boolean; someString: More about the in operator