UNPKG

svelte-ux

Version:

- Increment version in `package.json` and commit as `Version bump to x.y.z` - `npm run publish`

12 lines (11 loc) 542 B
/** * Store to manage unique values using `Set` (with improves ergonomics and better control of updates) */ export default function uniqueStore<T = string>(initialValues?: T[]): { add(value: T): void; addEach(values: T[]): void; delete(value: T): void; set(this: void, value: Set<T>): void; update(this: void, updater: import("svelte/store").Updater<Set<T>>): void; subscribe(this: void, run: import("svelte/store").Subscriber<Set<T>>, invalidate?: (value?: Set<T>) => void): import("svelte/store").Unsubscriber; };