interface SequenceSignal<T> {
    [ɵWRITABLE_SIGNAL]: T;
    [SIGNAL]: unknown;
    next: ((relativeChange?: number) => void);
    reset: (() => void);
    asReadonly(): Signal<T>;
    set(value: T): void;
    update(updateFn: ((value: T) => T)): void;
    (): T;
}

Type Parameters

  • T

Hierarchy

  • WritableSignal<T>
    • SequenceSignal

Methods

  • Returns a readonly version of this signal. Readonly signals can be accessed to read their value but can't be changed using set or update methods. The readonly signals do not have any built-in mechanism that would prevent deep-mutation of their value.

    Returns Signal<T>

  • Directly set the signal to a new value, and notify any dependents.

    Parameters

    • value: T

    Returns void

  • Update the value of the signal based on its current value, and notify any dependents.

    Parameters

    • updateFn: ((value: T) => T)
        • (value): T
        • Parameters

          • value: T

          Returns T

    Returns void

Properties

[ɵWRITABLE_SIGNAL]: T
[SIGNAL]: unknown
next: ((relativeChange?: number) => void)

Updates the signal to the next item in sequence. If at end and autoRestart is not disabled, then it will return to start.

reset: (() => void)

Updates the signal to the first item in sequence.