@kayahr/signal
    Preparing search index...

    Interface ToSignalOptions<T, Init>

    Options for converting a promise or observable to a signal.

    interface ToSignalOptions<T, Init = undefined> {
        equals?: false | ((previous: T | Init, next: T | Init) => boolean);
        initialValue?: Init;
    }

    Type Parameters

    • T
    • Init = undefined

    Hierarchy (View Summary)

    Index
    equals?: false | ((previous: T | Init, next: T | Init) => boolean)

    Compares the previous and next signal value.

    Returning true suppresses the update and keeps dependent computations clean. Set this to false to force an update for every source value.

    The previous signal value.

    The next signal value.

    True when both values should be treated as equal.

    initialValue?: Init

    The initial signal value used before the source produces its first value.