TS中的接口(interface)与类型别名(type alias)TS中的接口(interface)与类型别名(type alias)
TS中的接口(interface)与类型别名(type alias)定义在 typescript 中, 我们声明类型有两种方式: 接口(interface) 和类型别名(type alias),官方文档对于两者及其异同的描述如下:One of TypeScript’s core principles is that type checking focuses on the shape that values have. This is sometimes called “duck typing”