Skip to content

snapshotSet<T>(values?): SnapshotSet<T>

Defined in: packages/snapshot-set/src/snapshot-set.ts:407

Create a SnapshotSet backed by one toggle-version history per value, optionally pre-populated from an iterable.

Diverges from knotkit/disjoint-set’s growable factories: a duplicate value in the initial iterable is a silent no-op, matching add’s no-op-on-present rule, rather than a throw.

T

Iterable<T, any, any>

Values to insert, in iteration order.

SnapshotSet<T>