📌  相关文章
📜  索引签名参数类型不能是文字类型或泛型类型. - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:38.829000             🧑  作者: Mango

代码示例1
enum Options {
  ONE = 'one',
  TWO = 'two',
  THREE = 'three',
}
interface OptionRequirement {
  someBool: boolean;
  someString: string;
}
type OptionRequirements = {
  [key in Options]: OptionRequirement; // Note that "key in".
}