refactor(infra): remove setimmediate (#7821)

This commit is contained in:
EYHN
2024-08-13 14:25:33 +08:00
committed by GitHub
parent ccf225c8f9
commit 1db6b9fe3b
@@ -495,7 +495,8 @@ export class LiveData<T = unknown>
throw this.poisonedError; throw this.poisonedError;
} }
this.ops$.next('watch'); this.ops$.next('watch');
setImmediate(() => { // eslint-disable-next-line @typescript-eslint/no-floating-promises -- never throw
Promise.resolve().then(() => {
this.ops$.next('unwatch'); this.ops$.next('unwatch');
}); });
return this.raw$.value; return this.raw$.value;