types: undo unnecessary changes

This commit is contained in:
Yang Mingshan 2025-03-03 13:43:14 +08:00
parent 3fdd1c4242
commit 139a4d42f9
1 changed files with 2 additions and 4 deletions

View File

@ -47,7 +47,7 @@ const pendingPostFlushCbs: SchedulerJob[] = []
let activePostFlushCbs: SchedulerJob[] | null = null
let postFlushIndex = 0
const resolvedPromise = /*@__PURE__*/ Promise.resolve()
const resolvedPromise = /*@__PURE__*/ Promise.resolve() as Promise<any>
let currentFlushPromise: Promise<void> | null = null
const RECURSION_LIMIT = 100
@ -118,9 +118,7 @@ export function queueJob(job: SchedulerJob): void {
function queueFlush() {
if (!currentFlushPromise) {
currentFlushPromise = resolvedPromise.then(() => {
flushJobs()
})
currentFlushPromise = resolvedPromise.then(flushJobs)
}
}