Custom Client Event

How to make it right when I want to custom event for client for example: client.emit('someEvent', data) then can I use framework listeners for that events ? like create someEvent.ts file so that I can use or I need to do client.on('someEvent', handler) for it ?
Solution:
You don't need to do anything. Just make a listener with the file name and/event name prop set to the custom name. In case of the latter you just have to use module augmentation to ensure it gets detected because the event prop is keyof Client
Jump to solution
1 Reply
Solution
Favna
Favna12mo ago
You don't need to do anything. Just make a listener with the file name and/event name prop set to the custom name. In case of the latter you just have to use module augmentation to ensure it gets detected because the event prop is keyof Client