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

hyphen-cased event listeners are unknown when emit key is hyphen-cased #567

Closed
henribru opened this issue Oct 7, 2021 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@henribru
Copy link

henribru commented Oct 7, 2021

This component defines two emits, one hyphen-cased and one camel-cased: https://github.com/henribru/volar-emit-bug/blob/master/src/components/HelloWorld.vue#L12-L19

This component listens to both emits with hyphen-cased listeners: https://github.com/henribru/volar-emit-bug/blob/master/src/App.vue. The issue is that @foo-bar gets inferred as unknown, while @foo-baz gets inferred correctly. If I change the emit key for foo-bar to fooBar it works as well, so the combination of hyphen-cased emit key and hyphen-cased event listener seems to be broken.

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants