Javascript – Typescript – Restrict values of object keys to some possible values, but don't make them mandatory
I've got some types defined as: export const ABC= { A: 'A', B: 'B', C: 'C', } as const; export const DEF = { D: 'D', E: 'E', F: 'F', } as const; export type AbcTypes = (typeof ABC)[keyof typeof…