Open
Description
Hello,
Does anyone have an idea how to augment the ProductAttributes.product_data
interface in order to type the product metadata ?
I need this in order to handle my product variations, and handle subsequent api calls.
I tried creating a shoppingCart.d.ts
file but it doesn not work. The interface seems not to be augmentable ...
import "use-shopping-cart"
declare module "use-shopping-cart" {
interface ProductAttributes {
product_data: {
type: "MULTI" | "SINGLE"
barcode?: string
options?: string[]
productId: string
variantId?: string
}
}
}
This causes typescript to show errors when I try to access the item metadata
Metadata
Assignees
Labels
No labels
Activity