import { AbortOptions, MaybePromise } from '@mithic/commons'; /** A queue data structure. */ export interface Queue { /** Returns the first item of this {@link Queue}, or undefined if empty. */ front?(options?: AbortOptions): MaybePromise; /** Adds an item to this {@link Queue}. */ push(item: T, options?: AbortOptions): MaybePromise; /** Removes and returns the first item of this {@link Queue}, or undefined if empty. */ shift(options?: AbortOptions): MaybePromise; } /** A {@link Queue} that supports peeking the front element. */ export interface PeekableQueue extends Queue { front(options?: AbortOptions): MaybePromise; } /** A {@link Queue} with synchronous operations. */ export interface SyncQueue extends Queue { front?(): T | undefined; push(item: T): void; shift(): T | undefined; } //# sourceMappingURL=queue.d.ts.map