avancement planning
This commit is contained in:
+9
-2
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ZodRealError = exports.ZodError = void 0;
|
||||
const core = __importStar(require("../core/index.cjs"));
|
||||
const index_js_1 = require("../core/index.cjs");
|
||||
const util = __importStar(require("../core/util.cjs"));
|
||||
const initializer = (inst, issues) => {
|
||||
index_js_1.$ZodError.init(inst, issues);
|
||||
inst.name = "ZodError";
|
||||
@@ -39,11 +40,17 @@ const initializer = (inst, issues) => {
|
||||
// enumerable: false,
|
||||
},
|
||||
addIssue: {
|
||||
value: (issue) => inst.issues.push(issue),
|
||||
value: (issue) => {
|
||||
inst.issues.push(issue);
|
||||
inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);
|
||||
},
|
||||
// enumerable: false,
|
||||
},
|
||||
addIssues: {
|
||||
value: (issues) => inst.issues.push(...issues),
|
||||
value: (issues) => {
|
||||
inst.issues.push(...issues);
|
||||
inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);
|
||||
},
|
||||
// enumerable: false,
|
||||
},
|
||||
isEmpty: {
|
||||
|
||||
Reference in New Issue
Block a user