/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
/**
 * Used for allocating IDs unique to a particular instance of the allocator.
 */
export interface IdAllocator<TId = number> {
    /**
     * Allocates a block of `count` consecutive IDs and returns the first ID in the block.
     * For convenience can be called with no parameters to allocate a single ID.
     */
    allocate: (count?: number) => TId;
    /**
     * @returns The maximum ID that was generated by this allocator.
     */
    getMaxId: () => TId;
}
export interface IdAllocationState {
    maxId: number;
}
export declare function idAllocatorFromMaxId(maxId?: number | undefined): IdAllocator;
export declare function idAllocatorFromState(state: IdAllocationState): IdAllocator;
export declare const fakeIdAllocator: IdAllocator;
//# sourceMappingURL=idAllocator.d.ts.map