ts 交集类型

type Event = {
   name: string;
   dateCreated: string;
   type: string;
}

// error
type UserEvent extends Event = {
   UserId: string; 
}

// 交集类型
type UserEvent = Event & {UserId: string}
原文地址:https://www.cnblogs.com/ajanuw/p/12253025.html