UNPKG

hydrate-mongodb

Version:
24 lines (23 loc) 727 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var mappingError_1 = require("./mappingError"); var WriteContext = (function () { function WriteContext(path) { if (path === void 0) { path = ""; } this.path = path; this.errors = []; this.visited = []; } WriteContext.prototype.addError = function (message, path) { this.errors.push({ message: message, path: path || this.path }); this.hasErrors = true; }; WriteContext.prototype.getErrorMessage = function () { return mappingError_1.createErrorMessage(this.errors); }; return WriteContext; }()); exports.WriteContext = WriteContext;