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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -495,7 +495,8 @@ export class LiveData<T = unknown>
throw this.poisonedError;
}
this.ops$.next('watch');
setImmediate(() => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises -- never throw
Promise.resolve().then(() => {
this.ops$.next('unwatch');
});
return this.raw$.value;