When is the correct way to do a $fetch with parameters:
A: data is: globalThis.Ref<unknown, unknown>
const { data } = await useAsyncData("project", () =>
$fetch(`/api/project/${id}`,
)
B: data is: globalThis.Ref<Simplify<SerializeObject<{..... /> (correct)
const { data } = await useAsyncData("project", () =>
$fetch(`/api/project/:id`, { params: { id } }),
)
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
😕