or.npm put in -D nuxt-typed-router@legacy.Setup.Sign up the element in the nuxt.config.ts, done!export default defineNuxtConfig( elements: [' nuxt-typed-router'],. ).Example Use.pages/login. vue.When an option has actually no params determined, the params property is going to certainly not also be readily available as an option in the router.router.push('/ login/bar')// Inaccuracy!router.push( title: 'login', params: foo: 'pub')// Error!router.push(" https://vuejsfeed.com/login")// Excellent!router.push( title: 'login')// Excellent!pages/user/ [i.d.] vue.When an option has actually a demanded param described, getting through exactly to this path is going to toss an error if you don't provide a params home or if you put an incorrect param.router.push( label: 'user-id')// Inaccuracy!router.push( title: 'user-id', params: pub: 'baz')// Mistake!router.push('/ consumer')// Mistake!const i.d.="ey7878".router.push('/ customer/$ i.d. ')// Good!router.push( label: 'user-id', params: i.d.)// Good!router.push('/ consumer/$ i.d./ baguette')// Mistake!For addressed routes, the params home is going to be actually accessible and properly typed in.const option = useRoute().if (route.name === 'foo') console.log( route.params.baz)// Inaccuracy!console.log( route.params.foo)// Really good!