import type { IReadWriteBuffer } from "./api.js"; /** * Returns a {@link LIFOBuffer} with given max. capacity. * * @remarks * Read/write behavior is mostly the same as with {@link fifo}, with the * important difference, that (as the name indicates), the last value written * will be the first value read (i.e. stack behavior). * * @param cap */ export declare const lifo: (cap: number) => LIFOBuffer; export declare class LIFOBuffer implements IReadWriteBuffer { protected cap: number; protected buf: T[]; constructor(cap?: number); get length(): number; clear(): void; copy(): LIFOBuffer; readable(): boolean; read(): NonNullable; peek(): T; writable(): boolean; write(x: T): boolean; } //# sourceMappingURL=lifo.d.ts.map