arrayDeque<
A>(options?):Deque<A>
Defined in: packages/deque/src/array-deque.ts:52
Create a Deque over a plain array ring buffer, for elements of any
type except undefined. The type parameter excludes undefined, so
arrayDeque<number | undefined>() fails to compile; store null, or a
sentinel of your own, for a missing value.
Type Parameters
Section titled “Type Parameters”A extends { } | null
Parameters
Section titled “Parameters”options?
Section titled “options?”DequeOptions<A> = {}
Returns
Section titled “Returns”Deque<A>
Throws
Section titled “Throws”With code INVALID_CAPACITY when
options.capacity is not Infinity or a positive safe integer no larger than
DEQUE_MAX_CAPACITY (Infinity is accepted), INVALID_VALUE when
options.items holds undefined, or MAX_CAPACITY_EXCEEDED when
options.items holds more elements than the layout can store.