Interface Setter<T>

type definition for a signal setter (value getter) function.
notice that it contains a custom id property assigned to it, so it is not just any anonymous function. to manually replicate it, you will also need to assign an id property to the replica anonymous function.
this type of setter is what is returned by a signal create function, as opposed to pure setter function.

why would the id be needed?
good question. I don't know under what circumstances one would ever need this information. but for the sake of future proofing, and consistency with Accessor's definition, the id is assigned as a property anyway.

interface Setter<T> {
    id: number;
    (new_value): boolean;
}

Type Parameters

  • T

Hierarchy (view full)

Properties

Properties

id: number

the id of the signal, from which this setter originates from.
this property is statically inherited from Signal.id, when the setter function is created by a signal create function.

Generated using TypeDoc