Function unstable_createComputedSet

  • Experimental

    Creates a computed Set signal in Alien Signals that tracks changes to a source Set signal.

    Type Parameters

    • T

      The type of the items in the Set.

    Parameters

    • source: IWritableSignal<Set<T>>

      A signal containing a Set.

    Returns ISignal<Set<T>>

    A computed signal referencing that Set.

    const setSignal = createSignal(new Set([1, 2]));
    const compSet = createComputedSet(setSignal);