IWaitableDeque
Defined in: packages/data/src/deque/iwaitable-deque.ts:11
The blocking sibling of IDeque: waits for capacity when the deque is
full. The inherited unshift/push throws — this adds a way to wait, it
does not change the way to fail.
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”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):void
Defined in: packages/data/src/deque/ideque.ts:39
Adds an item to the back of the deque.
Parameters
Section titled “Parameters”T
The item to add to the back of the deque.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”pushAll()
Section titled “pushAll()”pushAll(
items):void
Defined in: packages/data/src/deque/ideque.ts:49
Adds every item to the back of the deque.
The items keep their relative order, so the last element of the array
becomes the new back — Array.prototype.push semantics.
Parameters
Section titled “Parameters”readonly T[]
The items to add to the back of the deque.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”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):void
Defined in: packages/data/src/deque/ideque.ts:22
Adds an item to the front of the deque.
Parameters
Section titled “Parameters”T
The item to add to the front of the deque.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”unshiftAll()
Section titled “unshiftAll()”unshiftAll(
items):void
Defined in: packages/data/src/deque/ideque.ts:32
Adds every item to the front of the deque.
The items keep their relative order, so the first element of the array
becomes the new front — Array.prototype.unshift semantics.
Parameters
Section titled “Parameters”readonly T[]
The items to add to the front of the deque.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”waitPush()
Section titled “waitPush()”waitPush(
item,signal?):Promise<void>
Defined in: packages/data/src/deque/iwaitable-deque.ts:40
Same as push, but waits for capacity if the operation would exceed it.
Parameters
Section titled “Parameters”T
signal?
Section titled “signal?”AbortSignal | null
Optional abort signal to cancel the operation.
Returns
Section titled “Returns”Promise<void>
IDeque.push
waitPushAll()
Section titled “waitPushAll()”waitPushAll(
items,signal?):Promise<void>
Defined in: packages/data/src/deque/iwaitable-deque.ts:49
Same as pushAll, but waits for capacity if the operation would exceed it.
The whole batch lands at once, never interleaved with another waiter’s.
Parameters
Section titled “Parameters”Iterable<T>
signal?
Section titled “signal?”AbortSignal | null
Optional abort signal to cancel the operation.
Returns
Section titled “Returns”Promise<void>
IDeque.pushAll
waitUnshift()
Section titled “waitUnshift()”waitUnshift(
item,signal?):Promise<void>
Defined in: packages/data/src/deque/iwaitable-deque.ts:19
Same as unshift, but waits for capacity if the operation would exceed it.
Parameters
Section titled “Parameters”T
signal?
Section titled “signal?”AbortSignal | null
Optional abort signal to cancel the operation.
Returns
Section titled “Returns”Promise<void>
IDeque.unshift
waitUnshiftAll()
Section titled “waitUnshiftAll()”waitUnshiftAll(
items,signal?):Promise<void>
Defined in: packages/data/src/deque/iwaitable-deque.ts:29
Same as unshiftAll, but waits for capacity if the operation would exceed
it. The whole batch lands at once, never interleaved with another
waiter’s.
Parameters
Section titled “Parameters”Iterable<T>
signal?
Section titled “signal?”AbortSignal | null
Optional abort signal to cancel the operation.
Returns
Section titled “Returns”Promise<void>
IDeque.unshiftAll