@@ -16,7 +16,6 @@ import type {
16
16
ValidateSerializableInput ,
17
17
Validator ,
18
18
} from '@tanstack/router-core'
19
- import type { JsonResponse } from '@tanstack/router-core/ssr/client'
20
19
import type {
21
20
AnyFunctionMiddleware ,
22
21
AnyRequestMiddleware ,
@@ -263,14 +262,14 @@ export interface OptionalFetcher<TMiddlewares, TInputValidator, TResponse>
263
262
extends FetcherBase {
264
263
(
265
264
options ?: OptionalFetcherDataOptions < TMiddlewares , TInputValidator > ,
266
- ) : Promise < FetcherData < TResponse > >
265
+ ) : Promise < Awaited < TResponse > >
267
266
}
268
267
269
268
export interface RequiredFetcher < TMiddlewares , TInputValidator , TResponse >
270
269
extends FetcherBase {
271
270
(
272
271
opts : RequiredFetcherDataOptions < TMiddlewares , TInputValidator > ,
273
- ) : Promise < FetcherData < TResponse > >
272
+ ) : Promise < Awaited < TResponse > >
274
273
}
275
274
276
275
export type FetcherBaseOptions = {
@@ -294,13 +293,6 @@ export type RscStream<T> = {
294
293
295
294
export type Method = 'GET' | 'POST'
296
295
297
- export type FetcherData < TResponse > =
298
- Awaited < TResponse > extends Response
299
- ? Awaited < TResponse >
300
- : Awaited < TResponse > extends JsonResponse < any >
301
- ? ReturnType < Awaited < TResponse > [ 'json' ] >
302
- : Awaited < TResponse >
303
-
304
296
export type ServerFnReturnType < TRegister , TResponse > =
305
297
Awaited < TResponse > extends Response
306
298
? TResponse
0 commit comments