标签: typescript
问题很简单。 为什么我必须使用typeof Enum而不是keyof Enum?
enum Direction { Up, Down, Left, Right, }
type enumKeys = keyof Direction;
vs
type enumKeys = keyof typeof Direction;