import type { Maybe } from "@thi.ng/api"; import type { IReadWriteBuffer } from "./api.js"; /** * Returns a {@link FIFOBuffer} ring buffer with given max. capacity and * first-in first-out (i.e. queue) behavior. * * @remarks * With this implementation, new writes will be ignored whilst the buffer's * capacity is reached. * * Also see {@link lifo}. * * @param cap */ export declare const fifo: (cap: number) => FIFOBuffer; /** * First-in, first-out ring buffer implementation. See {@link fifo}. */ export declare class FIFOBuffer implements IReadWriteBuffer { protected buf: Maybe[]; protected rpos: number; protected wpos: number; protected len: number; constructor(cap?: number); get length(): number; clear(): void; copy(): FIFOBuffer; readable(): boolean; read(): NonNullable; peek(): NonNullable; writable(): boolean; write(x: T): boolean; } //# sourceMappingURL=fifo.d.ts.map