vue-typed-emit
vue-typed-emit copied to clipboard
feat: extend type of `$root.$emit`
Hi,
It seems not working for global emit on $root.$emit
. Maybe it is not a big work to add that?
Regards
@emorvillez, thanks for a suggestion I will take a look.
@emorvillez It's possible. Do you have any suggestions regarding how it should be implemented? My suggestion is to add another type like WithRootEvents<RootEvents>
which will enhance typing of this.$root.$emit
? This will also add an ability to create an app specific utility type WithAppRootEvents = WithRootEvents<{ foo: 'bar' }>
.
This project is not maintained anymore since Vue 3 has introduced a built in support for typing component events.