Function signal

  • Create a Signal of type T with initial value

    Type Parameters

    • T

    Parameters

    • value: T

      Initial value

    • Optionaloptions: Options<T>

      Signal options

    Returns Getter<T> & Setter<T>

    const n = signal(1)
    
    n()
    
    n(3)