🪄 Automatically inferred return type for useFetch and $fetch based on method.
It'll be a type error to use the wrong method when hitting an endpoint.
Plus, if you have multiple methods served by a single endpoint (like ~/server/api/test.get.ts and ~/server/api/test.post.ts then the response type will match the kind of response you make.
It just needs to be bumped in this repo I believe so that useCsrfFetch can return the proper types.
Nuxt 3.2.0 includes a typing fix:
It just needs to be bumped in this repo I believe so that
useCsrfFetch
can return the proper types.