import debug from "debug"; /** * Set implementation which allows to get and put an object * there only limited amout of times. After limit is reached * attempt to put an object there causes the object to be finalized. */ export interface LimitedUseSetOpts { useLimit: number; finalize: (value: T) => Promise; formatItem: (value: T) => string; } export declare class LimitedUseSet { private _useCounts; private _useLimit; private _finalize; private _formatItem; private _objects; log: debug.Debugger; constructor(opts: LimitedUseSetOpts); push(value: T): Promise; private _isOverLimit; pop(): T | null; }