You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to access the params of a route within the typescript vue class as illustrated above and the compiler cannot resolve params.
What is expected?
That the params are found and no error is thrown
What is actually happening?
Typescript throws an error
The only way to get this working right now for me is to:
1 - Import the router to the component
2 - Access the params via string literals: router['history'].current.params.hash
This however breaks my linter.
The text was updated successfully, but these errors were encountered:
it's this.$route.params. router.history is not public API btw
Please, next time consider using the forum, the Discord server or StackOverflow for questions first. But feel free to come back and open an issue if it turns out to be a bug 🙂
Version
3.0.3
Reproduction link
https://i.stack.imgur.com/heuWw.png
Steps to reproduce
Try to access the params of a route within the typescript vue class as illustrated above and the compiler cannot resolve params.
What is expected?
That the params are found and no error is thrown
What is actually happening?
Typescript throws an error
The only way to get this working right now for me is to:
1 - Import the router to the component
2 - Access the params via string literals:
router['history'].current.params.hash
This however breaks my linter.
The text was updated successfully, but these errors were encountered: