Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Methods

Methods

  • get(value: unknown, attributes: Attributes<default>): unknown
  • Transform the attribute from the underlying model value and return it.

    Parameters

    • value: unknown

      the value to return

    • attributes: Attributes<default>

      receives a clone of the raw attributes

    Returns unknown

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

    Parameters

    • value: unknown

      the value to set

    • attributes: Attributes<default>

      receives a clone of the raw attributes

    Returns unknown

Generated using TypeDoc