vue
vue copied to clipboard
[2.7.10] [typescript] Cannot change the typing of $emit since 2.7.5
Version
2.7.10
Reproduction link
Steps to reproduce
- Clone the repo
- npm install
- npm run compile
What is expected?
No typescript compilation errors
What is actually happening?
There is typescript compilation errors
Since 2.7.5 and https://github.com/vuejs/vue/commit/005e52d0b6f1a5bf9679789c5c4b90afd442d86b, $emit cannot be typed with vue-class-component.
If you checkout commit 62000a803bbe4ed1dc9d30c20772a948cab49d16 and doing npm install to go back in vue 2.7.4 and npm run compile, everything is fine.
See file src/ComponentWithTypedEvents.ts to see examples about working typing of events.
BTW, still not working in [email protected]