maxpowa
Re:All JavaScript and TypeScript features of the last 3 years explained
on Thursday March 09, 2023 @11:47AM (#35083310)
WRT Enum as key in object:
enum TestEnum {
Fizz = 0,
Buzz,
Bar,
Baz
}
type EnumKeyedObject = Record<TestEnum, string>;
type EnumKeyedObjectAlt = { [P in TestEnum]: string };