or.npm put in -D nuxt-typed-router@legacy.Arrangement.Register the element in the nuxt.config.ts, carried out!export default defineNuxtConfig( elements: [' nuxt-typed-router'],. ).Instance Usage.pages/login. vue.When a route has no params described, the params home will certainly not even be actually accessible as an alternative in the router.router.push('/ login/bar')// Inaccuracy!router.push( name: 'login', params: foo: 'bar')// Error!router.push(" https://vuejsfeed.com/login")// Excellent!router.push( title: 'login')// Great!pages/user/ [id] vue.When a course has actually a required param specified, navigating exactly to this path will certainly toss an error if you do not deliver a params home or if you place a wrong param.router.push( name: 'user-id')// Error!router.push( name: 'user-id', params: bar: 'baz')// Error!router.push('/ user')// Mistake!const i.d.="ey7878".router.push('/ user/$ id ')// Great!router.push( label: 'user-id', params: id)// Really good!router.push('/ consumer/$ i.d./ baguette')// Error!For resolved routes, the params building will definitely be offered and also appropriately typed.const route = useRoute().if (route.name === 'foo') console.log( route.params.baz)// Inaccuracy!console.log( route.params.foo)// Excellent!