Options for asyncSignal.

interface AsyncSignalOptions<T> {
    debugName?: string;
    defaultValue?: T;
    equal?: ValueEqualityFn<T>;
    injector?: Injector;
    requireSync?: boolean;
}

Type Parameters

  • T

Hierarchy

  • Pick<CreateSignalOptions<T>, "debugName">
    • AsyncSignalOptions

Properties

debugName?: string

A debug name for the signal. Used in Angular DevTools to identify the signal.

defaultValue?: T

The default value before the first emission.

equal?: ValueEqualityFn<T>

Equal functions run on values emitted from async sources.

injector?: Injector

This is only used if a signal is created from an observable.

requireSync?: boolean

If true, then the passed value will eagerly be read and it will throw an error if it hasn't been set. You shouldn't use defaultValue in this case.