📅  最后修改于: 2022-03-11 14:48:52.484000             🧑  作者: Mango
代码示例1
type EnumDictionary = {
[K in T]: U;
};
enum Direction {
Up,
Down,
}
const a: EnumDictionary = {
[Direction.Up]: 1,
[Direction.Down]: -1
};