Typing a custom `useFetch` to include null
I've created a custom implementation to handle caching and error handling. I've followed these docs: https://nuxt.com/docs/guide/recipes/custom-usefetch#custom-usefetchuseasyncdata
However unlike a the native
I've attached a screenshot where you can see the types.
The code is this:
I've also tried typing my custom fetch return type with
How can I type my custom fetch to make the
However unlike a the native
useFetch, the type of data doesn't include nullI've attached a screenshot where you can see the types.
The code is this:
I've also tried typing my custom fetch return type with
ReturnType<typeof useFetch>, with no results.How can I type my custom fetch to make the
data type be Ref<T | null>?
Nuxt
How to create a custom fetcher for calling your external API in Nuxt 3.

