export default IdPool;
/**
 * Pool of unsigned integer IDs, useful when you don't want to just keep incrementing ID counter and want to re-use IDs after they are no longer needed
 * Main use case is when your IDs are array indices, having compact IDs lets you use fixed size array even as objects are added and removed as you're able to reuse slots in an efficient manner
 */
declare class IdPool {
    /**
     * Looks up next available ID without reserving it
     * If you want to also reserve the ID - use {@link get} instead
     * @returns {number}
     */
    peek(): number;
    /**
     *
     * @returns {number}
     */
    get(): number;
    /**
     * Attempt to request a specific ID from the pool.
     * @param {number} id
     * @return {boolean} true if request succeeds, false otherwise
     */
    getSpecific(id: number): boolean;
    /**
     *
     * @param {number} id
     * @returns {boolean}
     */
    isUsed(id: number): boolean;
    /**
     * Traverse all IDs currently in use
     * @param {function(id:number)} visitor
     */
    traverseUsed(visitor: any): void;
    /**
     *
     * @param {number} id
     */
    release(id: number): void;
    /**
     * Release all used IDs
     */
    reset(): void;
    #private;
}
//# sourceMappingURL=IdPool.d.ts.map