Function primitive

  • Indicates that this field contains a primitive value (or Date) which should be serialized literally to json.

    Example

    createModelSchema(Todo, {
    title: primitive(),
    })

    serialize(new Todo('test')) // { "title": "test" }

    Parameters

    • Optional additionalArgs: AdditionalPropArgs

      optional object that contains beforeDeserialize and/or afterDeserialize handlers

    Returns PropSchema

Generated using TypeDoc