Interface AttributeCaster

Interface describes what's expected to be implemented by a class that is tasked with value casting.

See

CastsAttributes.prototype.implementsCaster

Hierarchy

  • AttributeCaster

Properties

Properties

get: ((value, attributes) => unknown)

Type declaration

    • (value, attributes): unknown
    • Transform the attribute from the underlying model value and return it.

      Parameters

      • value: unknown

        the value to return

      • attributes: Attributes

        receives a clone of the raw attributes

      Returns unknown

set: ((value, attributes) => unknown)

Type declaration

    • (value, attributes): unknown
    • Transform the attribute to its underlying model values and return it.

      Parameters

      • value: unknown

        the value to set

      • attributes: Attributes

        receives a clone of the raw attributes

      Returns unknown

Generated using TypeDoc