-
-
Notifications
You must be signed in to change notification settings - Fork 597
Custom event auto complete #2558
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
Custom event auto complete #2558
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We miss a type check feature in event.
Location of the related code:
props: { ${propTypeStrings.join(', ')} } |
on: ComponentListeners<T>; |
You can try to study it or I do it.
Thanks for your PR.
We originally expected to change to a full type implementation.
But I think your implementation is perfect for the transition period.
I added features below!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I need some time for test.
Thanks for your help.
It doesn't give us type hints on what is coming from the event right? I've trying to find a good way to add a typed event but couldn't get anywhere close to a complete solution! Found this very nice package, but I think it's not supported by Vetur - in the component where you use the event, it's not able to recognize the payload of the event! Is there any good solution for that? |
How about using |
If I want to use it only for typing purpose I would need only to return true, right?
Also I am not very familiar with VSCode extensions, is there a way to use you PR to test it out? |
https://github.com/vuejs/vetur/wiki/Developing-Language-Server-Features |
I fixed the test with class components with |
This PR implements custom event auto complete.
Obtains data from
and
.
Validations are not implemented.close #2392