import type { SvelteSet } from 'svelte/reactivity'; import type { Boxed } from '../proxy/box.js'; import type { ConstBoxed } from '../proxy/const.js'; import type { FastBox } from '../fast/box.js'; import type { ConstFastBox } from '../fast/const.svelte.js'; /** * A Box wrapping a `SvelteSet`. Reactive on every `add`, `delete`, and * `clear`. Replace with `box.value = new SvelteSet(...)`. */ export type BoxedSet = Boxed>; /** * A {@link FastBox} around a `SvelteSet`. Reactive on every mutation. * No Proxy: reach methods through `.value` (`s.value.add(t)`, * `s.value.has(t)`). Replace with `s.value = new SvelteSet(...)`. * * `Set` has no `set` or `get`, so `FastBoxedSet` does not hit the same * destructive trap as `FastBoxedMap`. The "go through `.value`" rule * still applies. */ export type FastBoxedSet = FastBox>; /** * A {@link ConstBoxed} around a `SvelteSet`. Reference is frozen; * forwarded calls (`s.add(t)`) still mutate. */ export type ConstBoxedSet = ConstBoxed>; /** * A {@link ConstFastBox} around a `SvelteSet`. No Proxy; reach methods * through `.value`. Reference is frozen, inner set stays reactive. */ export type ConstFastBoxedSet = ConstFastBox>; /** * {@link BoxedSet}: Box around a fresh `SvelteSet`. Reactive on every * mutation (`add`, `delete`, `clear`). * * @param values Optional initial values, same shape as `Set`'s constructor. */ export declare function boxedSet(values?: Iterable | null): BoxedSet; /** * {@link FastBoxedSet}: {@link FastBox} around a fresh `SvelteSet`. Set * methods through `.value`: * * ```ts * const s = fastBoxedSet(['a']); * s.value.add('b'); * s.value.has('a'); * ``` * * @param values Optional initial values, same shape as `Set`'s constructor. */ export declare function fastBoxedSet(values?: Iterable | null): FastBoxedSet; /** * {@link ConstBoxedSet}: {@link ConstBox} around a fresh `SvelteSet`. * Reference is frozen; forwarded calls (`s.add(t)`) still mutate. * * @param values Optional initial values, same shape as `Set`'s constructor. */ export declare function constBoxedSet(values?: Iterable | null): ConstBoxedSet; /** * {@link ConstFastBoxedSet}: {@link ConstFastBox} around a fresh * `SvelteSet`. No Proxy; methods through `.value`. Reference is frozen, * inner set stays reactive. * * @param values Optional initial values, same shape as `Set`'s constructor. */ export declare function constFastBoxedSet(values?: Iterable | null): ConstFastBoxedSet;