type Event = { name: string; dateCreated: string; type: string; } // error type UserEvent extends Event = { UserId: string; } // 交集类型 type UserEvent = Event & {UserId: string}
ts 交集类型
原文:https://www.cnblogs.com/ajanuw/p/12253025.html