vue-storefront icon indicating copy to clipboard operation
vue-storefront copied to clipboard

Fix ProductGetters type to not assume API return structure

Open filipsobol opened this issue 4 years ago • 0 comments
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

filipsobol avatar Apr 27 '21 14:04 filipsobol