// eslint-disable-next-line @typescript-eslint/no-explicit-any type AnyFunc = (...args: any[]) => any; // @TODO? type GetStateFn = () => S; type MapUpdateGetStateFn = SingleUpdateProp extends AnyFunc ? (...params: Parameters) => (getState: GetStateFn) => ReturnType : SingleUpdateProp; type MapUpdate = { [K in keyof UpdateProps]: UpdateProps[K] | MapUpdateGetStateFn; }; export type { AnyFunc, GetStateFn, MapUpdateGetStateFn, MapUpdate, };