feat(companion): add cancellable pending event wait helper

This commit is contained in:
William Valentin
2026-02-16 22:18:17 -08:00
parent c41332a643
commit c4a8d099d6
6 changed files with 69 additions and 2 deletions
+4
View File
@@ -435,6 +435,10 @@ export class CompanionRuntimeClient {
this.rejectEventWaits(new Error('Event subscriptions cleared'));
}
cancelPendingEventWaits(reason = 'Event waits cancelled'): void {
this.rejectEventWaits(new Error(reason));
}
subscribeEvent<TData = unknown>(
eventName: CompanionEventName | string,
handler: CompanionTypedEventHandler<TData>,