@thi.ng/bidir-index
Version:
Bi-directional index mapping arbitrary keys to numeric IDs & vice versa
18 lines • 448 B
TypeScript
export interface SerializedBidirIndex<T> {
pairs: [T, number][];
nextID: number;
}
export interface BidirIndexOpts<T> {
/**
* Custom `key -> id` map implementation (e.g. {@link EquivMap} or
* {@link HashMap}). If omitted, a native JS `Map` will be used.
*/
map: Map<T, number>;
/**
* Start ID for indexing new keys.
*
* @defaultValue 0
*/
start: number;
}
//# sourceMappingURL=api.d.ts.map