// app.ts
const [checkListItems, dispatch] = useReducer<
CheckListReducer<CheckListItem>
>(checkListReducer<CheckListItem, CheckListAction<CheckListItem>>, []);
시발 이거 타입 어떻게 간소화함?
// type.d.ts
export type CheckListReducer<T> = Reducer<T[], CheckListAction<T>>;
export type CheckListTab = {
id: string;
name: string;
items: CheckListItem[];
};
export type CheckListAction<T> = UpdateAction<T> | DeleteAction<T> | InitAction<T> | AddAction<T>;
아시발 해결했다 ;; checkListReducer가 이미 타입추론 되는건데 생략을 안했음 ㅠ