or.npm install -D nuxt-typed-router@legacy.Setup.Sign up the component in the nuxt.config.ts, done!export default defineNuxtConfig( modules: [' nuxt-typed-router'],. ).Example Use.pages/login. vue.When a path has actually no params determined, the params home is going to certainly not also be actually available as a possibility in the modem.router.push('/ login/bar')// Inaccuracy!router.push( title: 'login', params: foo: 'bar')// Inaccuracy!router.push(" https://vuejsfeed.com/login")// Excellent!router.push( label: 'login')// Really good!pages/user/ [i.d.] vue.When a path has actually a required param defined, navigating exactly to this path is going to throw a mistake if you do not provide a params home or if you put an inappropriate param.router.push( label: 'user-id')// Mistake!router.push( label: 'user-id', params: club: 'baz')// Inaccuracy!router.push('/ customer')// Error!const i.d.="ey7878".router.push('/ consumer/$ id ')// Really good!router.push( name: 'user-id', params: i.d.)// Really good!router.push('/ consumer/$ i.d./ jewel')// Inaccuracy!For settled paths, the params building will be available and appropriately typed.const option = useRoute().if (route.name === 'foo') console.log( route.params.baz)// Inaccuracy!console.log( route.params.foo)// Excellent!