摘要: 交叉类型是将多个类型合并为一个类型。 这让我们可以把现有的多种类型叠加到一起成为一种类型,它包含了所需的所有类型的特性。 示例 interface Person { name: string age: number } interface Student { school: string } // 阅读全文
posted @ 2021-04-19 22:23 蓦然回首! 阅读(1065) 评论(0) 推荐(1) 编辑