Interface ValueAccessor

The abstraction used by the Field to read and write object properties.

interface ValueAccessor {
    get(obj, key): any;
    set(obj, key, value): any;
}

Methods

Methods

  • Returns the value that corresponds to key.

    Parameters

    • obj: any

      An arbitrary object from which the value must be read. May be undefined or null.

    • key: any

      The key to read.

    Returns any

    The value that corresponds to the key.

  • Returns the object updated where the key is associated with the new value.

    Parameters

    • obj: any

      The object to update. May be undefined or null.

    • key: any

      The key to write.

    • value: any

      The value to associate with the key.

    Returns any

    The updated object.