-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Typescript: Location
interface typing for params should be more permissive
#2662
Comments
Numbers will be added once automatic casting for numbers happens. Boolean won't because For the moment, using always strings is the right way, the typings are good |
try it by following code |
Same warnning, but my param type is Array, should I change it to string? |
I wrote |
Add as string |
Version
3.0.2
Reproduction link
https://codesandbox.io/s/mjjz2zlr8x?fontsize=14
Steps to reproduce
It just needs to follow the guide on https://router.vuejs.org/guide/essentials/navigation.html
By adding this:
I got this TS error in VSCode:
What is expected?
The property
params
in the interface Location must be more permissive that just the String type as valueWhat is actually happening?
If I try to pass a number or a boolean, there is an unexpected error
The text was updated successfully, but these errors were encountered: