feat(companion): add runtime dispose lifecycle helper
This commit is contained in:
@@ -357,6 +357,11 @@ export class CompanionRuntimeClient {
|
||||
ws.close(code, reason);
|
||||
}
|
||||
|
||||
dispose(code?: number, reason?: string): void {
|
||||
this.disconnect(code, reason);
|
||||
this.clearEventSubscriptions();
|
||||
}
|
||||
|
||||
subscribeEvents(handler: CompanionEventHandler): () => void {
|
||||
this.eventHandlers.add(handler);
|
||||
return () => {
|
||||
|
||||
Reference in New Issue
Block a user