UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

56 lines (27 loc) 827 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [EventRouter](./server.eventrouter.md) &gt; [listenerCount](./server.eventrouter.listenercount.md) ## EventRouter.listenerCount() method Get the number of listeners for a specific event type. **Signature:** ```typescript listenerCount<TEventType extends keyof EventPayloads>(eventType: TEventType): number; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> eventType </td><td> TEventType </td><td> The type of event to get the listener count for. </td></tr> </tbody></table> **Returns:** number The number of listeners for the event type.