2021年7月27日
摘要: 联合类型:通俗点说就是一个变量可能有多种类型。 比如:一个人(person)有可能是老师(teacher),也有可能是服务员(waiter),但是不可能同时是老师和服务员。 interface teacher{ type:string; say:()=>{}; } interface waiter{ 阅读全文
posted @ 2021-07-27 09:23 camellia_s 阅读(161) 评论(0) 推荐(0)