Skip to content

Commit 2a66a64

Browse files
JE-leeMaurice
and
Maurice
authored
Fix custom fetch type (#1587)
Co-authored-by: Maurice <[email protected]>
1 parent 1f7ad9d commit 2a66a64

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: .changeset/gorgeous-planes-rhyme.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"openapi-fetch": patch
3+
---
4+
5+
Fix the custom fetch type

Diff for: packages/openapi-fetch/src/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface ClientOptions extends Omit<RequestInit, "headers"> {
1919
/** set the common root URL for all API requests */
2020
baseUrl?: string;
2121
/** custom fetch (defaults to globalThis.fetch) */
22-
fetch?: typeof fetch;
22+
fetch?: (request: Request) => ReturnType<typeof fetch>;
2323
/** global querySerializer */
2424
querySerializer?: QuerySerializer<unknown> | QuerySerializerOptions;
2525
/** global bodySerializer */

0 commit comments

Comments
 (0)