From fc2b166c8f683ece948284cf7a629fcd5b096b40 Mon Sep 17 00:00:00 2001 From: Louis Duchemin Date: Wed, 19 Jun 2024 12:50:38 +0200 Subject: [PATCH] feat: export type RequestResult of fetch client --- .changeset/healthy-months-listen.md | 5 +++++ packages/client-fetch/src/types.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/healthy-months-listen.md diff --git a/.changeset/healthy-months-listen.md b/.changeset/healthy-months-listen.md new file mode 100644 index 000000000..11d0162ab --- /dev/null +++ b/.changeset/healthy-months-listen.md @@ -0,0 +1,5 @@ +--- +'@hey-api/client-fetch': patch +--- + +export RequestResult type diff --git a/packages/client-fetch/src/types.ts b/packages/client-fetch/src/types.ts index c0c6252c5..043902548 100644 --- a/packages/client-fetch/src/types.ts +++ b/packages/client-fetch/src/types.ts @@ -100,7 +100,7 @@ interface RequestOptionsBase extends Omit { url: string; } -type RequestResult = Promise< +export type RequestResult = Promise< ({ data: Data; error: undefined } | { data: undefined; error: Error }) & { request: Request; response: Response;