• Convert an arbitrary value to a proper FieldValue.

    Parameters

    • type: Metatype

      casts to a native equivalent of this type

    • value: any

      value to cast

    Returns FieldValue | FieldValue.Invalid | undefined

    the cast value or FieldValue.Invalid if cast is not possible