How to correctly type .json() when I add an error handler plugin #1272
predragnikolic
started this conversation in
General
Replies: 1 comment
-
|
Huh, I tried to override the //fets.d.ts
import "fets"
declare module "fets/typings/client" {
import { OpenAPIDocument } from "fets/typings/client/types"
export type OASResponse<TOAS extends OpenAPIDocument, TPath extends keyof TOAS['paths'], TMethod extends keyof TOAS['paths'][TPath]> = {
[TStatus in keyof OASStatusMap<TOAS, TPath, TMethod>]: TypedResponse<
FromSchema<
OASJSONResponseSchema<TOAS, TPath, TMethod, 200>
>,
Record<string, string>,
200
>;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
First here is stackblitz example https://stackblitz.com/edit/vitejs-vite-wr3soc?file=src%2Fmain.ts if you want to try help out.
I have the following fets code:
The issue
lets look at this code:
because I added the useErrors hook, I expect the following:
what should I do get the expected type?
Beta Was this translation helpful? Give feedback.
All reactions