Type Alias WritableSignal<T>

WritableSignal: { (): T; (value: T | (prev: T) => T): void }

WritableSignal is a function that returns the current signal value when called without arguments, or updates the signal when passed a new value or updater function.

Type Parameters

  • T

    The type of the signal value.

Type declaration

    • (): T
    • Returns T

    • (value: T | (prev: T) => T): void
    • Parameters

      • value: T | (prev: T) => T

      Returns void