core.typedeventtarget.listenercount
Home > @medplum/core > TypedEventTarget > listenerCount
TypedEventTarget.listenerCount() method
Gets the number of listeners for the provided Event type.
Signature:
listenerCount<TEventType extends keyof TEvents>(type: TEventType): number;
Parameters
Parameter | Type | Description |
|---|---|---|
type | TEventType | The name of the Event type. |
Returns:
number
The number of listeners for this Event type.