The type of the queued values.
The type of the queued values.
The values to enqueue, in order.
Itself, allowing for method chaining.
The values to enqueue, in order.
Itself, allowing for method chaining.
The removed value, or undefined if the queue is empty.
The next value to be popped, or undefined if the queue is empty.
The value to look for, compared by identity.
Whether the value is present.
Optionalentry: Type
Restrict deduplication to this value, leaving every other duplicate in place. Omit it to deduplicate the whole queue.
Itself, allowing for method chaining.
A new array of the values still waiting to be popped, front first. Already popped values are excluded.
A new queue holding the same pending values in the same order. The values themselves are shared, not copied.
The value to remove, compared by identity.
Whether a matching value was found and removed.
GradumQueue
Description
A first-in, first-out queue. push adds to the back, pop takes from the front, and addOnTop jumps the line. Popping does not shift the backing array, so draining a long queue stays cheap.