import { IndexMap, type IndexMapOptions } from './indexMap'; /** * Map from a physical index to a boolean (hidden/trimmed flags). * * Representation, mirroring `IndexesSequence`'s identity fast path: * - While every value equals the default (the common case — nothing hidden/trimmed) the store is a * single `length`, not an array. Insert/remove then run in O(1)/O(k) (length change only) instead of * rebuilding an n-element array, and nothing is retained between operations. * - On the first non-default write the store materializes as a `boolean[]`, kept and returned by * reference so the merge does not allocate per `updateCache`. * * `getValues()` still returns a plain `boolean[]`, so the merge predicate (`value === true`) and every * other consumer are unchanged. * * (A `Uint8Array` store would cut the materialized footprint ~8×, but exposing it from `getValues()` * forces the same generic-`IndexMap` refactor + contract break as the rejected typed-sequence change, * so the store stays `boolean[]` when populated.) * * @class BooleanMap */ export declare class BooleanMap extends IndexMap { #private; /** * Initializes the boolean map with a default value or factory (defaults to `false`). */ constructor(initValueOrFn?: boolean | ((index: number, ordinalNumber: number) => unknown), options?: IndexMapOptions); /** * Get the full list of boolean values. Returns the materialized array by reference (no per-call copy). * * @returns {boolean[]} */ getValues(): boolean[]; /** * Get the boolean value at a physical index. * * @param {number} index Physical index. * @returns {T | undefined} */ getValueAtIndex(index: number): T | undefined; /** * Get the number of indexes. * * @returns {number} */ getLength(): number; /** * Set new boolean values. Keeps the compact representation when all values equal the default. * * @param {Array} values List of boolean values. */ setValues(values: unknown[]): void; /** * Set the boolean value at a single physical index. Materializes the store on the first non-default write. * * @param {number} index Physical index. * @param {*} value The value to set (coerced to boolean). * @returns {boolean} */ setValueAtIndex(index: number, value: unknown): boolean; /** * Reset to the all-default state of the given length. O(1) for a constant default — no array is built. * * @private * @param {number} [length] Length of the map. */ setDefaultValues(length?: number): void; /** * Add values to the map and reorganize. * * @private * @param {number} insertionIndex Position inside the list. * @param {Array} insertedIndexes List of inserted indexes. */ insert(insertionIndex: number, insertedIndexes: number[]): void; /** * Remove values from the map and reorganize. * * @private * @param {Array} removedIndexes List of removed indexes. */ remove(removedIndexes: number[]): void; /** * Destroys the map instance. */ destroy(): void; }