diff --git a/framework/bigcommerce/index.tsx b/framework/bigcommerce/index.tsx index 4f6c9316b..261aa4d28 100644 --- a/framework/bigcommerce/index.tsx +++ b/framework/bigcommerce/index.tsx @@ -28,7 +28,7 @@ async function getError(res: Response) { return new FetcherError({ message: await getText(res), status: res.status }) } -const fetcher: Fetcher = async ({ +const fetcher: Fetcher = async ({ url, method = 'GET', variables, diff --git a/framework/commerce/index.tsx b/framework/commerce/index.tsx index f329c8054..e2dc60a9a 100644 --- a/framework/commerce/index.tsx +++ b/framework/commerce/index.tsx @@ -25,14 +25,14 @@ export type CommerceProps

= { config: CommerceConfig } -export type CommerceConfig = { fetcher: Fetcher } & Omit< +export type CommerceConfig = { fetcher: Fetcher } & Omit< CommerceContextValue, 'providerRef' | 'fetcherRef' > export type CommerceContextValue

= { providerRef: MutableRefObject

- fetcherRef: MutableRefObject> + fetcherRef: MutableRefObject locale: string cartCookie: string } diff --git a/framework/commerce/utils/types.ts b/framework/commerce/utils/types.ts index 5ff0360a1..3c81bac61 100644 --- a/framework/commerce/utils/types.ts +++ b/framework/commerce/utils/types.ts @@ -7,7 +7,9 @@ export type PickRequired = Omit & Required> // Core fetcher added by CommerceProvider -export type Fetcher = (options: FetcherOptions) => T | Promise +export type Fetcher = ( + options: FetcherOptions +) => T | Promise export type FetcherOptions = { url?: string diff --git a/framework/commerce/utils/use-data-2.ts b/framework/commerce/utils/use-data-2.ts index b8dc00b3d..1fddf56fb 100644 --- a/framework/commerce/utils/use-data-2.ts +++ b/framework/commerce/utils/use-data-2.ts @@ -32,7 +32,7 @@ export type UseData = < 'fetcher' >, input: HookInput, - fetcherFn: Fetcher + fetcherFn: Fetcher ) => ResponseState const useData: UseData = (options, input, fetcherFn) => {