mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
11 lines
460 B
TypeScript
11 lines
460 B
TypeScript
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;
|