IWaitableQueue
Defined in: packages/data/src/queue/iwaitable-queue.ts:11
The blocking sibling of IQueue: waits for capacity instead of throwing
when the queue is full. The inherited enqueue 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”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”dequeue()
Section titled “dequeue()”dequeue():
T|undefined
Defined in: packages/data/src/queue/iqueue.ts:38
Removes and returns the item at the front of the queue.
Returns
Section titled “Returns”T | undefined
The item at the front of the queue, or undefined if the queue is
empty.
Inherited from
Section titled “Inherited from”enqueue()
Section titled “enqueue()”enqueue(
item):void
Defined in: packages/data/src/queue/iqueue.ts:22
Adds an item to the rear of the queue.
Parameters
Section titled “Parameters”T
The item to add to the queue.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”enqueueAll()
Section titled “enqueueAll()”enqueueAll(
items):void
Defined in: packages/data/src/queue/iqueue.ts:30
Adds every item to the rear of the queue, in array order, so the last one is the last to be dequeued.
Parameters
Section titled “Parameters”readonly T[]
The items to add to the queue.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”front()
Section titled “front()”front():
T|undefined
Defined in: packages/data/src/queue/iqueue.ts:46
Returns the item at the front of the queue without removing it.
Returns
Section titled “Returns”T | undefined
The item at the front of the queue, or undefined if the queue is
empty.
Inherited from
Section titled “Inherited from”waitEnqueue()
Section titled “waitEnqueue()”waitEnqueue(
item,signal?):Promise<void>
Defined in: packages/data/src/queue/iwaitable-queue.ts:19
Same as enqueue, 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>
IQueue.enqueue
waitEnqueueAll()
Section titled “waitEnqueueAll()”waitEnqueueAll(
items,signal?):Promise<void>
Defined in: packages/data/src/queue/iwaitable-queue.ts:29
Same as enqueueAll, 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>
IQueue.enqueueAll