[2.7.10] [typescript] Cannot change the typing of $emit since 2.7.5

This issue has been tracked since 2022-08-31.

Version

2.7.10

Reproduction link

github.com

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 005e52d, $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.

vidal7 wrote this answer on 2022-09-21

BTW, still not working in [email protected]

More Details About Repo
Owner Name vuejs
Repo Name vue
Full Name vuejs/vue
Language TypeScript
Created Date 2013-07-29
Updated Date 2022-10-03
Star Count 199758
Watcher Count 6095
Fork Count 32874
Issue Count 590

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date