Skip to content

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.

T extends DefinedValue = DefinedValue

readonly capacity: 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.

IBounded.capacity

[iterator](): Iterator<T, any, any>

Defined in: node_modules/.store/typescript-npm-6.0.3-585eecd158/package/lib/lib.es2015.iterable.d.ts:47

Iterator<T, any, any>

IDeque.[iterator]


back(): T | undefined

Defined in: packages/data/src/deque/ideque.ts:81

Returns the item at the back of the deque without removing it.

T | undefined

The item at the back of the deque, or undefined if the deque is empty.

IDeque.back


clear(): void

Defined in: packages/data/src/collection/icollection.ts:23

Removes all elements from the collection.

void

IDeque.clear


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.

number

IDeque.count


front(): T | undefined

Defined in: packages/data/src/deque/ideque.ts:73

Returns the item at the front of the deque without removing it.

T | undefined

The item at the front of the deque, or undefined if the deque is empty.

IDeque.front


pop(): T | undefined

Defined in: packages/data/src/deque/ideque.ts:65

Removes and returns the item at the back of the deque.

T | undefined

The item at the back of the deque, or undefined if the deque is empty.

IDeque.pop


push(item): void

Defined in: packages/data/src/deque/ideque.ts:39

Adds an item to the back of the deque.

T

The item to add to the back of the deque.

void

IDeque.push


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.

readonly T[]

The items to add to the back of the deque.

void

IDeque.pushAll


shift(): T | undefined

Defined in: packages/data/src/deque/ideque.ts:57

Removes and returns the item at the front of the deque.

T | undefined

The item at the front of the deque, or undefined if the deque is empty.

IDeque.shift


unshift(item): void

Defined in: packages/data/src/deque/ideque.ts:22

Adds an item to the front of the deque.

T

The item to add to the front of the deque.

void

IDeque.unshift


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.

readonly T[]

The items to add to the front of the deque.

void

IDeque.unshiftAll


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.

T

AbortSignal | null

Optional abort signal to cancel the operation.

Promise<void>

IDeque.push


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.

Iterable<T>

AbortSignal | null

Optional abort signal to cancel the operation.

Promise<void>

IDeque.pushAll


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.

T

AbortSignal | null

Optional abort signal to cancel the operation.

Promise<void>

IDeque.unshift


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.

Iterable<T>

AbortSignal | null

Optional abort signal to cancel the operation.

Promise<void>

IDeque.unshiftAll