diff --git a/.changeset/gorgeous-planes-rhyme.md b/.changeset/gorgeous-planes-rhyme.md new file mode 100644 index 000000000..5ece1b05e --- /dev/null +++ b/.changeset/gorgeous-planes-rhyme.md @@ -0,0 +1,5 @@ +--- +"openapi-fetch": patch +--- + +Fix the custom fetch type diff --git a/packages/openapi-fetch/src/index.d.ts b/packages/openapi-fetch/src/index.d.ts index b85861113..e914ed77a 100644 --- a/packages/openapi-fetch/src/index.d.ts +++ b/packages/openapi-fetch/src/index.d.ts @@ -19,7 +19,7 @@ export interface ClientOptions extends Omit { /** set the common root URL for all API requests */ baseUrl?: string; /** custom fetch (defaults to globalThis.fetch) */ - fetch?: typeof fetch; + fetch?: (request: Request) => ReturnType; /** global querySerializer */ querySerializer?: QuerySerializer | QuerySerializerOptions; /** global bodySerializer */