react-ecommerce-hook
Version:
a basic shopping cart react hook
18 lines (17 loc) • 408 B
TypeScript
export declare const initialState: {
addedIds: any[];
quantityById: {};
};
declare type TypeAddedIds = number[];
interface IQuantityById {
[key: string]: number;
}
interface IStateType {
addedIds: TypeAddedIds;
quantityById: IQuantityById;
}
export declare const cartReducer: (state: {
addedIds: any[];
quantityById: {};
}, action: any) => IStateType;
export {};