https://www.basedash.com/blog/typescript-object-with-dynamic-keys
Constrained Dynamic Keys At times, you'd want to constrain the dynamic keys to a specific set of values, perhaps based on another array or tuple.
const validKeys = ['a', 'b', 'c'] as const;
type ValidKeysType = typeof validKeys[number];