You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

10 lines
460 B

interface EventInterface<EventPayload> {
addHandler<T>(handler: EventInterface.HandlerInterface<EventPayload, T>, context?: T): EventInterface<EventPayload>;
removeHandler<T>(handler: EventInterface.HandlerInterface<EventPayload, T>, context?: T): EventInterface<EventPayload>;
}
declare module EventInterface {
interface HandlerInterface<EventPayload, T> {
(payload: EventPayload, context: T): void;
}
}
export default EventInterface;