Skip to content

Commit

Permalink
✨ add declaration for new events using EventMap
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-runge committed Aug 4, 2024
1 parent a0294d6 commit 0c2de27
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ export namespace Sender {
*/
useUnicastDestination?: string;
}

export interface EventMap {
changedResendStatus: boolean;
error: Error;
}
}

export declare interface Sender {
on<K extends keyof Sender.EventMap>(
type: K,
listener: (event: Sender.EventMap[K]) => void,
): this;
}

export class Sender extends EventEmitter {
Expand Down

0 comments on commit 0c2de27

Please sign in to comment.