/** * GecutQueue class */ export declare class GecutQueue { /** * Creates a new GecutQueue instance * @param {string} name - The name of the queue * @param {('animationFrame' | 'idleCallback' | number)} delayPeriod - The delay period for the queue */ constructor(name: string, delayPeriod: 'animationFrame' | 'idleCallback' | number); name: string; private delayPeriod; /** * The queue map * @type {Map>} */ private queue; /** * The values map * @type {Map} */ private values; private runningId?; /** * Pushes a new promise to the queue * @param {Promise} promise - The promise to push * @param {string} [id] - The optional id for the promise * @returns {{ id: string }} - The id of the pushed promise */ push( promise: Promise, id?: string, ): { id: string; }; /** * Gets the value of a promise * @param {string} id - The id of the promise * @returns {Promise} - The promise value */ getValue(id: string): T | Promise; /** * Checks if a promise is running * @param {string} id - The id of the promise * @returns {boolean} - Whether the promise is running */ isRunning(id: string): boolean; isFinished(id: string): boolean; /** * Waits for a promise to finish * @param {string} id - The id of the promise * @returns {Promise} - The promise result */ waitForFinish(id: string): Promise; /** * Waits for all promises to finish * @returns {Promise} - The promise results */ waitForAllFinish(): Promise; /** * Gets the delay period function based on the delay period type * @private * @param {('animationFrame' | 'idleCallback' | number)} delayPeriod - The delay period type * @returns {() => Promise} - The delay period function */ private getDelayPeriodFunction; } //# sourceMappingURL=queue.d.ts.map