Skip to content

Commit

Permalink
Fix custom fetch type (#1587)
Browse files Browse the repository at this point in the history
Co-authored-by: Maurice <1245183029@qq.com>
  • Loading branch information
JE-lee and Maurice committed Mar 29, 2024
1 parent 1f7ad9d commit 2a66a64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-planes-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"openapi-fetch": patch
---

Fix the custom fetch type
2 changes: 1 addition & 1 deletion packages/openapi-fetch/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface ClientOptions extends Omit<RequestInit, "headers"> {
/** set the common root URL for all API requests */
baseUrl?: string;
/** custom fetch (defaults to globalThis.fetch) */
fetch?: typeof fetch;
fetch?: (request: Request) => ReturnType<typeof fetch>;
/** global querySerializer */
querySerializer?: QuerySerializer<unknown> | QuerySerializerOptions;
/** global bodySerializer */
Expand Down

0 comments on commit 2a66a64

Please sign in to comment.