Millwork
    Preparing search index...

    Class CodecTransform<V, O, Raw>

    The legacy ember-data transform of one codec. ember-data gives the @attr options to the transform, so @attr('money', { wire: 'decimal' }) reads the decimal wire form.

    Note: ember-data runs a transform only in a serializer. store.push does not run it, so a pushed record shows the raw value. Use a SchemaRecord field (valueField) for pushed data.

    Type Parameters

    • V = unknown
    • O = unknown
    • Raw = unknown
    Index
    • The raw value from the payload as the rich value. Bad raw data gives undefined.

      Parameters

      • serialized: Raw | null | undefined
      • Optionaloptions: O | null

      Returns V | undefined

    • The rich value back to its raw form. null for a missing value.

      Parameters

      • deserialized: V | null | undefined
      • Optionaloptions: O | null

      Returns Raw | null