摘要: 接口(Interfaces)主要用来定义对象的类型,接口和声明的变量需要一致(可选择可选属性或者任意属性) 例子 interface Person { name: string; age: number; } let tom: Person = { name: 'Tom', age: 25 }; 可 阅读全文
posted @ 2022-06-08 15:01 沉默的大叔 阅读(126) 评论(0) 推荐(0)