type StateReducerProp<S extends object, A extends {
    type: string;
}> = (state: S, actionAndChanges: (A & {
    props: any;
}) & {
    changes: Partial<S>;
}) => Partial<S>;
export type Props<S extends object, A extends {
    type: string;
}> = Partial<S> & {
    stateReducer: StateReducerProp<S, A>;
    onStateChange?: (changes: {
        type: A['type'];
    } & Partial<S>) => void;
};
export type Action<S extends object, A extends {
    type: string;
}, P extends Props<S, A>> = A & {
    props: P;
};
export type Reducer<S extends object, A extends {
    type: string;
}> = (state: S, action: A & {
    props: any;
}) => Partial<S>;
export {};
