@kayahr/signal
    Preparing search index...

    Interface Setter<T>

    Updates the value of a signal directly or from its current value.

    The setter returns the written value.

    Type Parameters

    • T
    • Updates the signal to the provided value.

      Type Parameters

      • U

      Parameters

      • value: U

        The next signal value.

      Returns U

      The written value.

    • Updates the signal with a value derived from its current value.

      Type Parameters

      • U

      Parameters

      • value: (value: T) => U

        A function deriving the next signal value from the current one.

      Returns U

      The written value.