/** An initial Set value or a lazy iterable initializer. @public */ export type SetInitializer = Iterable | (() => Iterable); /** Stable actions returned by {@link useSet}. @public */ export interface UseSetActions { /** Adds a value when it is not already present. */ readonly add: (value: T) => void; /** Removes a value when it is present. */ readonly remove: (value: T) => void; /** Adds a value or removes it when it is already present. */ readonly toggle: (value: T) => void; /** Removes every value. */ readonly clear: () => void; /** Restores the first captured values. */ readonly reset: () => void; } /** A readonly Set snapshot and stable actions returned by {@link useSet}. @public */ export type UseSetResult = readonly [ReadonlySet, UseSetActions]; /** * Manages an immutable Set snapshot with stable mutation actions. * * @param initialValue - Values or a lazy values initializer captured once. * @returns A readonly Set and stable actions. * @public */ export declare function useSet(initialValue?: SetInitializer): UseSetResult;