solution
Unions and Indexed Access Types in TypeScript
The more obvious solution to this challenge is to use the ProgramModeMap
type directly with the indexed access type:
type PlannedPrograms = | ProgramModeMap["PLANNED_ONE_ON_ONE"] | ProgramModeMap["PLANNED_SELF_DIRECTED"];
This works, and our test case passes:
type
Loading solution