import { type Event, type IIDGen, type INotify, type Listener } from "@thi.ng/api"; import { type IDGenEventType } from "./api.js"; /** * Simple monotonically increasing numeric ID generator. Unbounded and depending * on numeric range covered, inprecise (e.g. for values outside the JS safe * integer range). * * Unlike {@link IDGen}, this class doesn't keep track of generated IDs and the * {@link MonotonicID.free} implementation only checks if a given ID could * possibly already have been generated. */ export declare class MonotonicID implements IIDGen, INotify { start: number; step: number; nextID: number; constructor(start?: number, step?: number); next(): number; free(id: number): boolean; addListener(id: IDGenEventType, fn: Listener, scope?: any): boolean; removeListener(id: IDGenEventType, fn: Listener, scope?: any): boolean; notify(event: Event): boolean; } /** * Returns a new {@link MonotonicID} instance with given `start` offset * (default: 0) and `step` size (default: 1). * * @param start * @param step */ export declare const monotonic: (start?: number, step?: number) => MonotonicID; //# sourceMappingURL=monotonic.d.ts.map