Interface ObserverSignalOptions<T>

Options for ObserverSignal.

interface ObserverSignalOptions<T = unknown> {
    equal?: EqualFunction<T>;
    initialValue?: T;
    requireSync?: boolean;
}

Type Parameters

  • T = unknown

Hierarchy (View Summary)

Properties

equal?: EqualFunction<T>

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

initialValue?: T

Optional initial value to set when observable does not emit a value synchronously on subscription.

requireSync?: boolean

If set to true (default is false) and no initial value is specified and observable does not emit a value synchronously on subscription then an exception is thrown. Otherwise the signal value type will include undefined as valid value and the signal is initialized to value undefined.

This setting is ignored if an initial value is set.