A signal that is updated with TIn, but emits TOut due to a selector specified at creation.

interface MapSignal<TIn, TOut> {
    [SIGNAL]: unknown;
    input: WritableSignal<TIn>;
    asReadonly(): Signal<TOut>;
    set(value: TIn): void;
    update(updateFn: ((value: TIn) => TIn)): void;
    (): TOut;
}

Type Parameters

  • TIn
  • TOut

Hierarchy (view full)

Methods

Properties

Methods

Properties

[SIGNAL]: unknown
input: WritableSignal<TIn>

Contains the values that are input to the signal. Calling set or update on this will have the same behavior as calling the main set or update methods and is exposed to make it easier for binding.