Asking here because you might use typescript
Let's say I have a type
export type a = "b" | "c";
Then I want to define either an enum or a const object like this:
export const myConst: Record<a, a> = {
b: "b",
c: "c"
}
Then I can use the constants of a specific type in my program, without having loose strings hanging around. But it seems kinda stupid to make a const object like this and have it map directly from the same type to the same type. Is there a better way?