Remove shortcut handlers

This commit is contained in:
Jon Staab
2025-03-24 17:45:15 -07:00
parent 88b44776d8
commit 98c6c33b1b
3 changed files with 41 additions and 59 deletions
-8
View File
@@ -35,7 +35,6 @@ export type SubscriptionOptions = {
tracker?: Tracker
autoClose?: boolean
verifyEvent?: (event: SignedEvent) => boolean
on?: Partial<SubscriptionEvents>
}
export class Subscription extends (EventEmitter as new () => TypedEmitter<SubscriptionEvents>) {
@@ -98,13 +97,6 @@ export class Subscription extends (EventEmitter as new () => TypedEmitter<Subscr
)
}
// Register listeners
if (this.options.on) {
for (const [k, listener] of Object.entries(this.options.on)) {
this.on(k as keyof SubscriptionEvents, listener)
}
}
// Autostart asynchronously so the caller can set up listeners
yieldThread().then(this.open)
}