type Keys = 'option1' | 'option2'; type Flags = { [K in Keys]: boolean };