import { Handle } from 'dojo-interfaces/core'; export interface QueueItem { isActive: boolean; callback: null | ((...args: any[]) => any); } /** * Schedules a callback to the macrotask queue. * * @param callback the function to be queued and later executed. * @returns An object with a `destroy` method that, when called, prevents the registered callback from executing. */ export declare const queueTask: (callback: (...args: any[]) => any) => Handle; /** * Schedules an animation task with `window.requestAnimationFrame` if it exists, or with `queueTask` otherwise. * * Since requestAnimationFrame's behavior does not match that expected from `queueTask`, it is not used there. * However, at times it makes more sense to delegate to requestAnimationFrame; hence the following method. * * @param callback the function to be queued and later executed. * @returns An object with a `destroy` method that, when called, prevents the registered callback from executing. */ export declare const queueAnimationTask: (callback: (...args: any[]) => any) => Handle; /** * Schedules a callback to the microtask queue. * * Any callbacks registered with `queueMicroTask` will be executed before the next macrotask. If no native * mechanism for scheduling macrotasks is exposed, then any callbacks will be fired before any macrotask * registered with `queueTask` or `queueAnimationTask`. * * @param callback the function to be queued and later executed. * @returns An object with a `destroy` method that, when called, prevents the registered callback from executing. */ export declare let queueMicroTask: (callback: (...args: any[]) => any) => Handle;