@esmj/task
Version:
Tiny task management library which divide long task. Improve core web vitals and browser responsiveness.
16 lines (14 loc) • 521 B
text/typescript
declare global {
interface Window {
scheduler?: {
yield: () => Promise<void>;
};
}
}
declare function nextFrameYield(): Promise<unknown>;
declare function forceYield(frame?: number): Promise<unknown>;
declare function autoYield(): Promise<unknown>;
declare function setConfig(newConfig?: {}): void;
declare function autoYieldReset(): void;
declare function autoYieldStartPoint(): void;
export { autoYield, autoYieldReset, autoYieldStartPoint, forceYield, nextFrameYield, setConfig };