/** * Polyfill for requestAnimationFrame. * * @param {Function} callback The function to call when it's time. * @returns {number} */ export declare function requestAnimationFrame(callback: () => void): number; /** * Polyfill for cancelAnimationFrame. * * @param {number} id The request Id, generated by `requestAnimationFrame`. */ export declare function cancelAnimationFrame(id: number): void; /** * Schedules a low-priority task to run when the browser is idle. Uses `requestIdleCallback` * when available — with a timeout, so the task still progresses when the browser never idles — * and falls back to `requestAnimationFrame` otherwise. * * Use this for background work that nothing visual waits for (e.g. cache warming); unlike an * animation frame, an idle task does not compete with rendering while the user scrolls. * * @param {Function} callback The function to call during an idle period. * @param {number} [timeout=100] The maximum delay (in milliseconds) before the task is forced to run. * @returns {number} */ export declare function requestIdleTask(callback: () => void, timeout?: number): number; /** * Cancels a task scheduled with `requestIdleTask`. * * @param {number} id The task Id, generated by `requestIdleTask`. */ export declare function cancelIdleTask(id: number): void; /** * @returns {boolean} */ export declare function isTouchSupported(): boolean; /** * Checks if the environment that the code runs in is a browser. * * @returns {boolean} */ export declare function isCSR(): boolean; /** * Get string comparison function for sorting purposes. It supports multilingual string comparison base on Internationalization API. * * @param {string} [language] The language code used for phrases sorting. * @param {object} [options] Additional options for sort comparator. * @returns {*} */ export declare function getComparisonFunction(language?: string, options?: object): (a: string, b: string) => number;