Example:
Explain to me what keyof typeof means in TypeScript
keyof typeof
enum ColorsEnum { white = \'#ffffff\', black = \'#000000\', } type
An enum creates an instantiated object. With typeof we get the auto generated type of this enum.
enum
object
typeof
Now we can get all indices with keyof to make sure Colors can only contain one of them.
keyof
Colors