feat(): add event-driven example for WS API commands

This commit is contained in:
tiagosiebler
2025-01-22 16:53:27 +00:00
parent 98d2331f0e
commit 82611aac15
2 changed files with 161 additions and 0 deletions

View File

@@ -203,9 +203,11 @@ export class WsStore<
removeAfter: boolean,
): void {
const promise = this.getDeferredPromise(wsKey, promiseRef);
if (promise?.reject) {
promise.reject(value);
}
if (removeAfter) {
this.removeDeferredPromise(wsKey, promiseRef);
}