Skip to content

ItemQueueItems<T>

Unofficial

Backing storage for an ItemQueue, providing queue operations on an array.

Import:

import type { ItemQueueItems } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface ItemQueueItems<T>

Properties

PropertyTypeDescription
lengthnumberNumber of items in the queue.
offsetnumberIndex offset for the next dequeue operation.
queueT[]Internal array holding queued items.

Methods

MethodReturnsDescription
clear()voidRemove all items from the queue.
dequeue()T | undefinedRemove and return the next item from the front of the queue.
enqueue(item)voidAdd an item to the end of the queue.
enqueueArray(items)voidAdd multiple items to the end of the queue.
get()T[]Get all items currently in the queue.
isEmpty()booleanWhether the queue has no items.
peek()T | undefinedReturn the next item without removing it.
remove(item)voidRemove a specific item from the queue.

Links to this page: