export interface Item { id: string; quantity: number; } export interface Cart { id: string; items: I[]; } export declare const createCartStore: >(defaultCart: C, onValidate?: ((value: C) => Promise) | undefined, namespace?: string) => { getItem: (id: string) => Item | undefined; addItem: (item: Item) => void; updateItemQuantity: (id: string, quantity: number) => void; removeItem: (id: string) => void; emptyCart: () => void; inCart: (id: string) => boolean; isEmpty: () => boolean; set: (val: C) => void; read: () => C; readInitial: () => C; subscribe: (sub: (value: C) => void | (() => void)) => () => void; };