@kayahr/signal

    Interface BaseSignalOptions<T>

    Base signal options.

    interface BaseSignalOptions<T = unknown> {
        equal?: EqualFunction<T>;
        throttle?: null | number;
        version?: number;
    }

    Type Parameters

    • T = unknown

    Hierarchy (View Summary)

    Index

    Properties

    equal?: EqualFunction<T>

    Optional function to compare signal values. Defaults to Object.is().

    throttle?: null | number

    Optional number of milliseconds to throttle change notifications or null if throttling is disabled (default). This only affects subscribed observers, it does not influence the synchronous retrieval of the signal value via Signal.get.

    version?: number

    Optional initial signal value version. Defaults to 0. There is usually no need to set this. This option only exists to allow testing the version number wrap in unit tests.

    MMNEPVFCICPMFPCPTTAAATR