Skip to content

isEvent

github-actions[bot] edited this page Dec 3, 2024 · 3 revisions
API / isEvent function

Checkes whether the provided instance is an event (implements IEvent<TSubject, TEventArgs>).

function isEvent<TEvent extends IEvent<any, any> = IEvent<any, any>>(
  maybeEvent: any
): maybeEvent is TEvent

Source reference: src/events/isEvent.ts:9.

Generic Parameters

Parameters

  • maybeEvent: any
    The value to check if is an event.

Returns: maybeEvent is TEvent

Returns true if the provided instance implements IEvent<TSubject, TEventArgs>; otherwise false.

Clone this wiki locally