Menu

Typescript

Typescript 中的 interface 和 type 区别

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. 翻译如下: 接口可以在extends或im...