mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-18 02:21:51 +08:00
chore: bump typescript 7 (#15465)
This commit is contained in:
@@ -24,9 +24,7 @@ export function noop(_?: unknown) {
|
||||
}
|
||||
|
||||
export async function nextTick() {
|
||||
// @ts-expect-error check window.scheduler
|
||||
if ('scheduler' in window && 'yield' in window.scheduler) {
|
||||
// @ts-expect-error check window.scheduler.yield
|
||||
return window.scheduler.yield();
|
||||
} else if (typeof requestIdleCallback !== 'undefined') {
|
||||
return new Promise(resolve => requestIdleCallback(resolve));
|
||||
|
||||
Reference in New Issue
Block a user