Closed mbadr2200 closed 10 months ago
@mbadr2200 ohmyfetch is deprecated. can you please try upgrading to latest ofetch
?
i changed the body to this and it worked
type Options<R extends Request, M extends Method<R>> = Omit<FetchOptions,'body'> & {
method: M;
body?: Body<R,M> extends Record<string,any> ? Body<R,M> : never;
}
oh , i didn't know that , thank you
@mbadr2200 ohmyfetch is deprecated. can you please try upgrading to latest
ofetch
?
Environment
node : v16.20.1
Reproduction
.
Describe the bug
it's not a bug but i want to make a composable like
useFetch
in nuxt with type-safe IntelliSense When I extend the Fetch options I get intellesense with this typebody?: ((BodyInit | Record<string, any> | null) & Product) | undefined
and a lot of properties that I don't need so I try to omit thebody
from the fetch options to get the property I need only but I got error on the $fetch functionthis is my code below
Package.json:
I would appreciate any help
Additional context
No response
Logs
No response