Which of these is the correct way to fetch?
When is the correct way to do a $fetch with parameters:
A: data is:
globalThis.Ref<unknown, unknown>
B: data is: globalThis.Ref<Simplify<SerializeObject<{..... />
(correct)
A works if I just cast everything to any, but I lose all types.
B also works, but it looks weird that I have to have an :id
and declare a params
π2 Replies
the first one. params is for query params
Hmm, why is type information lost though?