Skip to content

Defined in: packages/deque/src/deque.ts:7

The options every deque factory accepts, whatever its storage.

The record is the same for every layout, so a caller can switch layout by changing the factory alone.

A

readonly optional items?: Iterable<A, any, any>

Defined in: packages/deque/src/deque.ts:13

Elements to push at the back, in iteration order, as the deque is built. With capacity, only the last capacity of them remain, as if each had been pushed in turn.


readonly optional capacity?: number

Defined in: packages/deque/src/deque.ts:21

The most elements the deque holds. A push onto a full deque evicts the element at the opposite end and returns it, which makes a bounded deque a sliding window. Must be Infinity or a positive safe integer no larger than DEQUE_MAX_CAPACITY. Omit it, or pass Infinity, for a deque that grows without bound; that is the value Deque.capacity reports.