接口

未匹配的标注

对象

对象的属性值

interface Config {
  id: number,
  size?: string;
  [propName: string]: any;
}

对象的方法

interface Animal {
  live(): void;
}

函数的参数类型和返回类型

interface SearchFunc {
  (foo: string, baz: number): boolean;
}

继承

interface Dog extends Animal {
  woof(): void;
}

本文章首发在 LearnKu.com 网站上。

上一篇 下一篇
讨论数量: 0
发起讨论 查看所有版本


暂无话题~