Skip to content

IDeque

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

Interface representing a double-ended queue (deque) data type.

A deque is a generalized version of a queue that allows insertion and removal of items from both ends.

T extends DefinedValue = DefinedValue

The type of elements in the deque. Anything except undefined, which means “no element”.

[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>

ICollection.[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.


clear(): void

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

Removes all elements from the collection.

void

ICollection.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

ICollection.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.


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.


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


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


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.


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


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