vue-storefront
vue-storefront copied to clipboard
Fix ProductGetters type to not assume API return structure
trafficstars
Currently, we assume that the products passed to getAttributes and getFiltered methods in ProductGetters is an array of PRODUCT, but the response from the API could be of any type. We should add a new generic to this interface that will define the structure of response.
https://github.com/vuestorefront/vue-storefront/blob/next/packages/core/core/src/types.ts#L503-L519