-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
The withDefaults function loses arguments when assigning a function default value #5253
Comments
Arrow function seems to work |
|
Thank you, but why doesn't my way of writing it work? I think it's still a bug |
When using a method like you do, you would have to explicitly type |
I specified this: undefined as you said, but it still does not work properly. I have tried three ways of writing, maybe you need to teach me |
The mentioned fact that you need to use an arrow function or annotate https://v3.vuejs.org/guide/typescript-support.html#annotating-props But indeed, a method with |
I created a PR for this problem #5615 |
Version
3.2.26
Reproduction link
sfc.vuejs.org/
Steps to reproduce
What is expected?
Returns the correct default value
What is actually happening?
Function defaults lose arguments
The text was updated successfully, but these errors were encountered: