1. 首页
  2. 数据库
  3. 其它
  4. Typescript 中的 interface 和 type 到底有什么区别详解

Typescript 中的 interface 和 type 到底有什么区别详解

上传者: 2020-12-23 02:51:36上传 PDF文件 39KB 热度 33次
interface VS type 大家使用 typescript 总会使用到 interface 和 type,官方规范 稍微说了下两者的区别 An interface can be named in an extends or implements clause, but a type alias for an object type literal cannot. An interface can have multiple merged declarations, but a type alias for an object type literal cannot. 但是没有
用户评论