/** * @class Queue * @util */ declare class Queue { /** * The ordered collection of items held in the queue, where index 0 is the front. */ items: unknown[]; /** * Initializes the queue with an optional pre-populated array of items. */ constructor(initial?: unknown[]); /** * Add new item or items at the back of the queue. * * @param {*} items An item to add. */ enqueue(...items: unknown[]): void; /** * Remove the first element from the queue and returns it. * * @returns {*} */ dequeue(): unknown; /** * Return the first element from the queue (without modification queue stack). * * @returns {*} */ peek(): unknown; /** * Check if the queue is empty. * * @returns {boolean} */ isEmpty(): boolean; /** * Return number of elements in the queue. * * @returns {number} */ size(): number; } export default Queue;