smolcart.js
Version:
a teeny tiny wrapper for Shopify's Ajax API
20 lines (17 loc) • 316 B
text/typescript
declare global {
interface Window {
SmolCart: unknown;
SmolPolyLoaded: unknown;
}
}
export interface NewItem {
id: string;
quantity?: number;
properties?: Record<string, string>;
}
export enum ActionType {
Add = 'ADD',
Modify = 'MODIFY',
GetCart = 'GET_CART',
ClearCart = 'CLEAR_CART',
}