isEvent - Andrei15193/react-model-view-viewmodel GitHub Wiki
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
.
-
TEvent - The type of event to check, defaults to
IEvent<TSubject, TEventArgs>
.Type constraints: IEvent<
any
,any
>.
Default value: IEvent<any
,any
>.
-
maybeEvent:
any
The value to check if is an event.
Returns true
if the provided instance implements IEvent<TSubject, TEventArgs>
; otherwise false
.