From 0356aabee5ac4875b077c96fed8a0b41c4c34592 Mon Sep 17 00:00:00 2001 From: guoyangzhen Date: Thu, 2 Apr 2026 12:52:38 +0800 Subject: [PATCH] fix: pass generic type T through to FetchOptions in $Fetch interface (#559) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The $Fetch interface accepts generics but only passes R to FetchOptions, leaving T defaulting to any. This means FetchContext and FetchResponse in hooks always have any type. Fixed by passing T through: FetchOptions → FetchOptions --- src/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types.ts b/src/types.ts index 66a84faf..cd5444f8 100644 --- a/src/types.ts +++ b/src/types.ts @@ -5,11 +5,11 @@ export interface $Fetch { ( request: FetchRequest, - options?: FetchOptions + options?: FetchOptions ): Promise>; raw( request: FetchRequest, - options?: FetchOptions + options?: FetchOptions ): Promise>>; native: Fetch; create(defaults: FetchOptions, globalOptions?: CreateFetchOptions): $Fetch;