Function setDefaultModelSchema

  • Sets the default model schema for class / constructor function. Everywhere where a model schema is required as argument, this class / constructor function can be passed in as well (for example when using object or ref.

    When passing an instance of this class to serialize, it is not required to pass the model schema as first argument anymore, because the default schema will be inferred from the instance type.

    Returns

    model schema

    Type Parameters

    • T

    Parameters

    • clazz: Clazz<T>

      class or constructor function

    • modelSchema: ModelSchema<T>

      a model schema

    Returns ModelSchema<T>

Generated using TypeDoc