Change propsPicker for typescript type infer
hapood opened this issue · comments
hapood commented
from:
type PropsPicker<S, AS extends RootState, CP> = (
state: S,
actions: ActionCreatorsMapObject,
allState: AS,
reducerDict: ReducerDict
) => { [P in keyof CP]: CP[P] };
to
export type StateDict = { [key: string]: {} };
export type ActionsDict = {
[key: string]: ActionCreatorsMapObject;
};
export type PropsPicker<CP = any> = (
stateDict: StateDict,
actionsDict: ActionsDict
) => Partial<CP>;