ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
38 lines (37 loc) • 1.87 kB
TypeScript
import type { UtilBeanCollection } from '../interfaces/agCoreBeanCollection';
/**
* If the key was passed before, then doesn't execute the func
* @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time.
*/
export declare const _doOnce: {
(func: () => void, key: string): void;
/** Expose the internal set for testing purposes */
_set: Set<string>;
};
/**
* Batch calls to execute after the next macro task (mode = setTimeout) / or in the next requestAnimationFrame.
* @param {Function} func The function to be batched
* @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time.
*/
export declare function _batchCall(func: () => void): void;
export declare function _batchCall(func: () => void, mode: 'raf', beans: UtilBeanCollection): void;
/**
* Creates a debounced function, and attach it to a bean for lifecycle
* @param {Function} func The function to be debounced
* @param {number} delay The time in ms to debounce
* @returns {Function} The debounced function
* @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time.
*/
export declare function _debounce<TArgs extends any[], TContext>(bean: {
isAlive(): boolean;
}, func: (this: TContext, ...args: TArgs) => void, delay: number): (this: TContext, ...args: TArgs) => number;
/**
* @param {Function} func The function to be throttled
* @param {number} wait The time in ms to throttle
* @returns {Function} The throttled function
*/
export declare function _throttle(func: (...args: any[]) => void, wait: number): (...args: any[]) => void;
/** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */
export declare function _waitUntil(bean: {
addDestroyFunc(func: () => void): void;
}, condition: () => boolean, callback: () => void, timeout?: number): void;