@storefront-x/catalog-magento-px
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -1,10 +0,5 @@ | ||
interface Extension<Ext = Record<string, never>> { | ||
<T extends (...arg: any) => any>(useProduct: T): (...arg: any) => ReturnType<T> & Ext | ||
} | ||
import Extension from '#ioc/types/base/Extension' | ||
import UseProductType from '#ioc/types/catalog-magento-px/UseProductType' | ||
interface UseProduct { | ||
message: string | ||
} | ||
const useProduct: Extension<UseProduct> = | ||
const useProduct: Extension<UseProductType> = | ||
(useProduct) => | ||
@@ -11,0 +6,0 @@ (...args) => { |
import field from '#ioc/graphql/field' | ||
import addFields from '#ioc/utils/graphql/addFields' | ||
import Extension from '#ioc/types/base/Extension' | ||
interface Extension<Ext = Record<string, never>> { | ||
<T extends (...arg: any) => any>(useProduct: T): (...arg: any) => ReturnType<T> & Ext | ||
} | ||
const CategoryList: Extension = | ||
@@ -9,0 +6,0 @@ (CategoryList) => |
import MAGENTO_URL from '#ioc/config/MAGENTO_URL' | ||
import Extension from '#ioc/types/base/Extension' | ||
interface Extension<Ext = Record<string, never>> { | ||
<T extends (...arg: any) => any>(useProduct: T): (...arg: any) => ReturnType<T> & Ext | ||
} | ||
interface ToCategory { | ||
interface ToCategoryType { | ||
thumbnailUrl: string | ||
} | ||
const ToCategory: Extension<ToCategory> = (ToCategory) => (data) => ({ | ||
const ToCategory: Extension<ToCategoryType> = (ToCategory) => (data) => ({ | ||
...ToCategory(data), | ||
@@ -13,0 +10,0 @@ thumbnailUrl: data.thumbnail ? MAGENTO_URL + '/media/catalog/category/' + data.thumbnail : null, |
{ | ||
"name": "@storefront-x/catalog-magento-px", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"license": "MIT", | ||
@@ -9,3 +9,3 @@ "type": "module", | ||
}, | ||
"gitHead": "ab8064954884f004083b47c03ee45c7f8df7a096" | ||
"gitHead": "1c213a2443f9c12ad47ba4d2139717ce09bac8a7" | ||
} |
7
3074
55