Type alias GetEventHandlerArgs<E>

GetEventHandlerArgs<E>: E extends EventHandler<infer T> ? T : unknown

Utility type for inferring type of event handler args.

Example

const handler = new EventHandler<{ param: string }>();
const args: GetEventHandlerArgs<typeof handler>; // { param: string }

Type Parameters

Generated using TypeDoc