Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Typescript definition for named route params #702

Open
abraxxa opened this issue Feb 13, 2024 · 0 comments
Open

Missing Typescript definition for named route params #702

abraxxa opened this issue Feb 13, 2024 · 0 comments

Comments

@abraxxa
Copy link

abraxxa commented Feb 13, 2024

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant