/** An initial Map value or a lazy iterable initializer. @public */ export type MapInitializer = Iterable | (() => Iterable); /** Stable actions returned by {@link useMap}. @public */ export interface UseMapActions { /** Sets one key to a value. */ readonly set: (key: K, value: V) => void; /** Replaces all entries with a new iterable. */ readonly setAll: (entries: Iterable) => void; /** Removes one key when it exists. */ readonly remove: (key: K) => void; /** Removes every entry. */ readonly clear: () => void; /** Restores the first captured entries. */ readonly reset: () => void; } /** A readonly Map snapshot and stable actions returned by {@link useMap}. @public */ export type UseMapResult = readonly [ReadonlyMap, UseMapActions]; /** * Manages an immutable Map snapshot with stable mutation actions. * * @param initialValue - Entries or a lazy entries initializer captured once. * @returns A readonly Map and stable actions. * @public */ export declare function useMap(initialValue?: MapInitializer): UseMapResult;