• Type Parameters

    • Source
    • Target

    Parameters

    Returns {
        set: (x: Target) => void;
        update: (f: (x: Target) => Target) => void;
        subscribe(
            this: void,
            run: Subscriber<Target>,
            invalidate?: Invalidator<Target>,
        ): Unsubscriber;
    }

    • set: (x: Target) => void
    • update: (f: (x: Target) => Target) => void
    • subscribe:function
      • Subscribe on value changes.

        Parameters

        • this: void
        • run: Subscriber<Target>

          subscription callback

        • Optionalinvalidate: Invalidator<Target>

          cleanup callback

        Returns Unsubscriber