Function update

  • Similar to deserialize, but updates an existing object instance. Properties will always updated entirely, but properties not present in the json will be kept as is. Further this method behaves similar to deserialize.

    Returns

    deserialized object, possibly incomplete.

    Type Parameters

    • T

    Parameters

    • modelschema: ClazzOrModelSchema<T>
    • instance: T
    • json: any

      the json to deserialize

    • Optional callback: ((err: any, result: T) => void)

      the callback to invoke once deserialization has completed.

        • (err: any, result: T): void
        • Parameters

          • err: any
          • result: T

          Returns void

    • Optional customArgs: any

      custom arguments that are available as context.args during the deserialization process. This can be used as dependency injection mechanism to pass in, for example, stores.

    Returns void

  • Type Parameters

    • T

    Parameters

    • instance: T
    • json: any
    • Optional callback: ((err: any, result: T) => void)
        • (err: any, result: T): void
        • Parameters

          • err: any
          • result: T

          Returns void

    • Optional customArgs: any

    Returns void

Generated using TypeDoc