UNPKG

mongo-ts-struct

Version:

Mongoose wrapper for Typescript supports

32 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class BaseError extends Error { constructor(params) { super(params.massage || params.reason || ''); this.code = params.code; this.type = params.type; this.originalError = params.originalError; this.reason = params.reason; } } class TypedSchemaDecoratorMissingError extends BaseError { constructor(massage) { super({ code: 'ERR_01', type: 'TypedSchemaDecoratorMissingError', massage: "The provided class missing 'TypedSchema' Decorator." }); } } exports.TypedSchemaDecoratorMissingError = TypedSchemaDecoratorMissingError; class EmptyTypedSchemaClassError extends BaseError { constructor(massage) { super({ code: 'ERR_02', type: 'EmptyTypedSchemaClassError', massage: "TypedSchema class must contain at least one 'Property' decorated class member." }); } } exports.EmptyTypedSchemaClassError = EmptyTypedSchemaClassError; //# sourceMappingURL=index.js.map