Angular Signal Generators
    Preparing search index...

    Interface WritableHistorySignal<T>

    A writable HistorySignal.

    interface WritableHistorySignal<T> {
        "[SIGNAL]": unknown;
        canRedo: Signal<boolean>;
        canUndo: Signal<boolean>;
        asReadonly(): Signal<T>;
        clearHistory(): void;
        redo(): boolean;
        set(value: T): void;
        undo(): boolean;
        update(updateFn: (value: T) => T): void;
        (): T;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    • HistorySignal<T>
    • Pick<WritableSignal<T>, "set" | "update" | "asReadonly">
      • WritableHistorySignal
    Index
    • 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

      Returns void

    "[SIGNAL]": unknown
    canRedo: Signal<boolean>

    Whether an undone value can be restored.

    canUndo: Signal<boolean>

    Whether an earlier value can be restored.