Minor net2 cleanup

This commit is contained in:
Jon Staab
2025-03-24 13:35:43 -07:00
parent b985003333
commit d7b74d2c7e
6 changed files with 39 additions and 24 deletions
+3 -3
View File
@@ -25,7 +25,7 @@ export type PublishOptions = {
adapter: AbstractAdapter
event: SignedEvent
timeout?: number
events?: Partial<PublishEvents>
on?: Partial<PublishEvents>
}
export class Publish extends (EventEmitter as new () => TypedEmitter<PublishEvents>) {
@@ -63,8 +63,8 @@ export class Publish extends (EventEmitter as new () => TypedEmitter<PublishEven
)
// Register handlers
if (this.options.events) {
for (const [k, listener] of Object.entries(this.options.events)) {
if (this.options.on) {
for (const [k, listener] of Object.entries(this.options.on)) {
this.on(k as keyof PublishEvents, listener)
}
}