victorgarciaesgi / nuxt-typed-router

🚦Provide autocompletion and typecheck to Nuxt router
https://nuxt-typed-router.vercel.app
MIT License
361 stars 12 forks source link

Suggestion: Typed Query Params #103

Open malkhuzayyim opened 1 year ago

malkhuzayyim commented 1 year ago

Is it at all possible to support types for query params, assuming we do define them on the pages that accept query params?

Something like: https://tanstack.com/router/v1/docs/guide/search-params#validating-and-typing-search-params

Or would this be overreaching a bit here?

victorgarciaesgi commented 1 year ago

It not at all overreaching I though about it too, but as I'm based only on Nuxt file system, which is based on file name this is not possible at the moment :( If Nuxt add a way of declaring query params and can provide it to the modules it can be possible.