해결된 질문
작성
·
156
0
export type Event =
| {
type: "click";
event: MouseEvent;
}
| {
type: "focus";
event: FocusEvent;
}
| {
type: "keydown";
event: KeyboardEvent;
};
type ClickEvent = Extract<Event, {type:'click'}>;
type tests2 = [Expect<Equal<ClickEvent, { type: "click"; event: MouseEvent }>>];
에러 없는거 보니 정답인것 같습니다!