/** * Set actions interface */ export type SetActions = { add: (value: T) => void; remove: (value: T) => void; toggle: (value: T) => void; reset: () => void; clear: () => void; has: (value: T) => boolean; }; /** * Hook that tracks state of a Set * * @template T - Element type * @param initialValue - Initial set values * @returns Tuple of [set, actions] * * @example * ```tsx * const [set, { add, remove, toggle, has }] = useSet([1, 2, 3]); * * return ( *
* * * *

Has 3: {String(has(3))}

*
{JSON.stringify(Array.from(set), null, 2)}
*
* ); * ``` */ export declare function useSet(initialValue?: T[]): [Set, SetActions]; //# sourceMappingURL=useSet.d.ts.map