Wow did not know that. Looks quite confusing to me, but maybe I'm old or smth.
I expect those `"a" | "b" | "c"` to be expressed as an enum, not strings and |s.
I expect those `"a" | "b" | "c"` to be expressed as an enum, not strings and |s.
But hey, why not!
The more distinctive features in TypeScript would be what you can to with keyof/typeof, indexed access types, conditional types and especially mapped types.
Out of curiosity, what do you mean by dynamically? Isn't that just a case statement, or am I misunderstanding?
You can do this in Python too..?