跳到主要内容

实践经验

  • 添加注释,会给更智能的提示

注释

export interface ITaskGroupDetail {  /** 1 文字排版 2 图文排版 */  type: 1 | 2;}
  • 使用 interface 某个成员的类型
interface ITaskGroupDetail {  type: 1 | 2;}interface ITest {  type: type: ITaskGroupDetail['type']}