Remove shortcut handlers
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user