给对象动态添加属性

interface User {
  userName: string,
  age: number,
  [key: string | number]: string |number | boolean;  //动态添加属性
}
Logo

前往低代码交流专区

更多推荐