ILossyDeque
Defined in: packages/data/src/deque/ilossy-deque.ts:14
The lossy sibling of IDeque: never throws or waits when a bounded
deque is full, evicting or skipping instead (overflowPolicy).
"evict" drops the end opposite the insertion — push (back) drops the
front, unshift (front) drops the back — mirroring Python’s
deque(maxlen=N) and Boost’s circular_buffer.
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”T extends DefinedValue = DefinedValue
Properties
Section titled “Properties”capacity
Section titled “capacity”
readonlycapacity:number
Defined in: packages/data/src/collection/ibounded.ts:17
The maximum number of elements the collection can hold.
Note: Infinity is not a legal value here — an unbounded type omits this
mixin.
Inherited from
Section titled “Inherited from”overflowPolicy
Section titled “overflowPolicy”
readonlyoverflowPolicy:OverflowPolicy
Defined in: packages/data/src/collection/ilossy.ts:20
Policy applied when the collection reaches its capacity.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”[iterator]()
Section titled “[iterator]()”[iterator]():
Iterator<T,any,any>
Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.es2015.iterable.d.ts:47
Returns
Section titled “Returns”Iterator<T, any, any>
Inherited from
Section titled “Inherited from”back()
Section titled “back()”back():
T|undefined
Defined in: packages/data/src/deque/ideque.ts:81
Returns the item at the back of the deque without removing it.
Returns
Section titled “Returns”T | undefined
The item at the back of the deque, or undefined if the deque is
empty.
Inherited from
Section titled “Inherited from”clear()
Section titled “clear()”clear():
void
Defined in: packages/data/src/collection/icollection.ts:23
Removes all elements from the collection.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”count()
Section titled “count()”count():
number
Defined in: packages/data/src/collection/icollection.ts:20
The number of elements in the collection.
A method, not a getter: its async counterpart needs a round trip to the backing store, and a member must have the same shape in both.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”front()
Section titled “front()”front():
T|undefined
Defined in: packages/data/src/deque/ideque.ts:73
Returns the item at the front of the deque without removing it.
Returns
Section titled “Returns”T | undefined
The item at the front of the deque, or undefined if the deque is
empty.
Inherited from
Section titled “Inherited from”pop():
T|undefined
Defined in: packages/data/src/deque/ideque.ts:65
Removes and returns the item at the back of the deque.
Returns
Section titled “Returns”T | undefined
The item at the back of the deque, or undefined if the deque is
empty.
Inherited from
Section titled “Inherited from”push()
Section titled “push()”push(
item): readonlyT[]
Defined in: packages/data/src/deque/ilossy-deque.ts:38
Same as IDeque.push, but never throws — returns the items dropped from
the front to make room (empty if nothing was dropped).
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”readonly T[]
IDeque.push
Overrides
Section titled “Overrides”pushAll()
Section titled “pushAll()”pushAll(
items): readonlyT[]
Defined in: packages/data/src/deque/ilossy-deque.ts:46
Same as IDeque.pushAll, but never throws — returns the items dropped from
the front to make room (empty if nothing was dropped).
Parameters
Section titled “Parameters”readonly T[]
Returns
Section titled “Returns”readonly T[]
IDeque.pushAll
Overrides
Section titled “Overrides”shift()
Section titled “shift()”shift():
T|undefined
Defined in: packages/data/src/deque/ideque.ts:57
Removes and returns the item at the front of the deque.
Returns
Section titled “Returns”T | undefined
The item at the front of the deque, or undefined if the deque is
empty.
Inherited from
Section titled “Inherited from”unshift()
Section titled “unshift()”unshift(
item): readonlyT[]
Defined in: packages/data/src/deque/ilossy-deque.ts:22
Same as IDeque.unshift, but never throws — returns the items dropped from
the back to make room (empty if nothing was dropped).
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”readonly T[]
IDeque.unshift
Overrides
Section titled “Overrides”unshiftAll()
Section titled “unshiftAll()”unshiftAll(
items): readonlyT[]
Defined in: packages/data/src/deque/ilossy-deque.ts:30
Same as IDeque.unshiftAll, but never throws — returns the items dropped
from the back to make room (empty if nothing was dropped).
Parameters
Section titled “Parameters”readonly T[]
Returns
Section titled “Returns”readonly T[]
IDeque.unshiftAll