make tsc happy

This commit is contained in:
Yanick Champoux 2023-03-11 13:51:23 -05:00
parent daa8421251
commit 5edbc688be

View File

@ -25,11 +25,15 @@ type BaseSelector<F extends (...args: any) => any, STATE> = (
state: STATE, state: STATE,
) => ReturnType<F>; ) => ReturnType<F>;
type BaseSelectors<S, STATE> = { type BaseSelectors<S extends Record<string, any>, STATE> = {
[key in keyof S]: BaseSelector<S[key], STATE>; [key in keyof S]: BaseSelector<S[key], STATE>;
}; };
export type AggregateSelectors<S, SUBS, STATE = {}> = BaseSelectors< export type AggregateSelectors<
S extends Record<string, (...args: any) => any>,
SUBS extends Record<string, Dux>,
STATE = {},
> = BaseSelectors<
UnionToIntersection<SelectorsOf<SUBS[keyof SUBS]> | S>, UnionToIntersection<SelectorsOf<SUBS[keyof SUBS]> | S>,
STATE STATE
>; >;