websanova / vue-auth

A simple light-weight authentication library for Vue.js
MIT License
2.36k stars 380 forks source link

Missing Typescript definition for named route params #702

Open abraxxa opened 9 months ago

abraxxa commented 9 months ago

For example if you want to pass something on logout

  void auth.logout({
    makeRequest: true,
    redirect: { name: 'auth-login', params: { foo: user.value.foo } }
  })

This Typescript definition in index.d.ts: type Redirect = {path: string} | {name: string} | string;

should also allow passing params to named routes. Something like this should work: type Redirect = {path: string} | {name: string, params?: { [key: string]: any } } | string;