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

Property Type Description
length number Number of items in the queue.
offset number Index offset for the next dequeue operation.
queue T[] Internal array holding queued items.

Methods

Method Returns Description
clear() void Remove all items from the queue.
dequeue() T | undefined Remove and return the next item from the front of the queue.
enqueue(item) void Add an item to the end of the queue.
enqueueArray(items) void Add multiple items to the end of the queue.
get() T[] Get all items currently in the queue.
isEmpty() boolean Whether the queue has no items.
peek() T | undefined Return the next item without removing it.
remove(item) void Remove a specific item from the queue.

Links to this page: