vue-typed-emit icon indicating copy to clipboard operation
vue-typed-emit copied to clipboard

feat: extend type of `$root.$emit`

Open emorvillez opened this issue 4 years ago • 2 comments

Hi,

It seems not working for global emit on $root.$emit. Maybe it is not a big work to add that?

Regards

emorvillez avatar Feb 10 '21 11:02 emorvillez

@emorvillez, thanks for a suggestion I will take a look.

andrewvasilchuk avatar Jul 24 '21 10:07 andrewvasilchuk

@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' }>.

andrewvasilchuk avatar Apr 28 '22 21:04 andrewvasilchuk

This project is not maintained anymore since Vue 3 has introduced a built in support for typing component events.

andrewvasilchuk avatar Jan 08 '23 21:01 andrewvasilchuk