Open pi0 opened 1 month ago
Improving fetch types would be an immense QOL improvement. I for one am very excited about this and am looking forward to more info as y'all push forward with it.
Will this also type readBody
to match the json serialization similiar to https://github.com/unjs/nitro/pull/1002?
And will this support alternative serializer to maintain type safety similiar to https://nuxt.com/docs/getting-started/data-fetching#using-an-alternative-serializer?
Is this still planned? To my knowledge, it's one of the things gating Nuxt 4
Context, work, and explanation by @danielroe: https://github.com/unjs/nitro/pull/1532
We are thinking of improving (auto-generated) typed fetch. This requires adopting a new standard/reusable type utility for fetch, which @danielroe is working on. By using the new layer, we can improve performance and consistency and adopt it in several places instead of directly being in nitro core (benefiting nuxt, and in next steps ofetch and h3 typed fetch support.)