Does TypeScript support events on classes?

后端 未结 8 810
小鲜肉
小鲜肉 2021-01-30 01:53

I am just wondering if in TypeScript you can define custom events on your classes or interfaces?

What would this look like?

8条回答
  •  耶瑟儿~
    2021-01-30 02:39

    You can find an event dispatcher declaration at YouTube. Following the video you will be able to have a fully typed version of the event dispatcher

提交回复
热议问题