"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValidationError = exports.ValidatorError = void 0;
const tslib_1 = require("tslib");
const _a = tslib_1.__importStar(require("@zyno-io/ts-server-foundation/type-metadata-runtime"));
const __tsf_metadata_type = _a.createCompactMetadataRegistryV1("[1,[{\"kind\":6}]]", []);
let _ValidatorErrorMetadata_1;
class ValidatorError extends Error {
    code;
    path;
    errors;
    constructor(code, message, path = '') {
        super(message);
        this.code = code;
        this.path = path;
        this.errors = [this];
    }
    static __tsfType = _ValidatorErrorMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"ValidatorError\",\"typeName\":\"ValidatorError\",\"classType\":{\"$tsf\":0},\"properties\":[{\"name\":\"errors\",\"type\":{\"kind\":14,\"type\":{\"kind\":16,\"typeName\":\"ValidatorError\",\"classType\":{\"$tsf\":1}}},\"optional\":false}],\"methods\":[],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"code\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false},{\"name\":\"message\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false},{\"name\":\"path\",\"type\":{\"$tsfType\":0},\"optional\":true,\"default\":true}]}]", [() => ValidatorError, () => (typeof ValidatorError !== "undefined" ? ValidatorError : (typeof exports !== "undefined" ? exports.ValidatorError : undefined))], __tsf_metadata_type);
}
exports.ValidatorError = ValidatorError;
exports.ValidationError = ValidatorError;
_ValidatorErrorMetadata_1.classType = ValidatorError;
ValidatorError.__tsfType = _ValidatorErrorMetadata_1;
//# sourceMappingURL=errors.js.map