import type { ComponentMap } from './component-map.js'; import { type ComponentClass, type Iterator } from './types.js'; /** * Component class map for storing registered component maps * @category Maps */ export declare class ComponentClassesMap { private hashIdToName; private hashIdToIndex; private indexToHashId; private maps; /** * Creates a new component classes map * @param entries - Optional initial data for the map */ constructor(entries?: readonly (readonly [number, ComponentMap])[] | null); /** * Returns the number of registered component maps */ get size(): number; /** * Clears all maps and internal indices while preserving array references */ clear(): void; /** * Retrieves a component map using the component class * @param componentClass - The component class to get the map for * @returns The {@link ComponentMap} for the specified class, or undefined if not found */ get(componentClass: ComponentClass): ComponentMap | undefined; /** * Checks if a component class map is already registered * @param componentClass - The component class to check * @returns True if the map is registered, otherwise false */ has(componentClass: ComponentClass): boolean; /** * Registers a component map. Automatically generates a hashId from the class name if missing * @param componentClass - The component class to register * @param map - The {@link ComponentMap} instance to store * @returns The {@link ComponentClassesMap} instance for chaining */ set(componentClass: ComponentClass, map: ComponentMap): this; /** * Maps a specific numeric hash id to a component map instance. * @param hash - The numeric hash id * @param map - The {@link ComponentMap} instance to store * @returns The {@link ComponentClassesMap} instance for chaining */ setByHashId(hash: number, map: ComponentMap): this; /** * Removes a component map and re-orders internal storage to maintain density * @param componentClass - The component class to remove the map for * @returns True if the map was removed, otherwise false */ delete(componentClass: ComponentClass): boolean; /** * Executes a callback for every map, providing the instance and its registered name * @param callback - The callback to execute */ forEach(callback: (value: ComponentMap, name: string) => void): void; /** * Returns an iterator of all component map instances * @returns An {@link ArrayIterator} of {@link ComponentMap} instances */ values(): ArrayIterator>; /** * Returns an iterator of [hashId, componentMap] pairs * @returns An {@link Iterator} instance */ entries(): Iterator<[number, ComponentMap]>; /** * Called when using JSON.stringify * @returns An object representation for serialization */ toJSON(): { ComponentClassesMap: number; iterable: [number, ComponentMap][]; }; } //# sourceMappingURL=component-classes.d.ts.map