@spree/storefront-api-v2-sdk
Version:
Node module to easily integrate your JavaScript or TypeScript application with Spree API V2. You can create an entirely custom Storefront in JS/TS with this package including one page checkout, Single Page Apps, PWAs and so on
13 lines (10 loc) • 618 B
text/typescript
import type { CreateFetcherConfig, Fetcher } from './ClientConfig'
// CreateFetchFetcherConfig allows any type for fetch and requestConstructor.
// This is done to allow fetch implementations not covering the complete, browser-side fetch interface.
// For example, node-fetch doesn't allow some browser-side configuration which would be
// ignored server-side anyway.
export type CreateFetchFetcherConfig = CreateFetcherConfig & {
fetch: typeof globalThis.fetch | any
requestConstructor: typeof globalThis.Request | any
}
export type CreateCustomizedFetchFetcher = (options: CreateFetchFetcherConfig) => Fetcher