@decaf-ts/decorator-validation
Version:
simple decorator based validation engine
81 lines • 3 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.jsTypes = exports.ReservedModels = exports.Primitives = void 0;
/**
* @description Enumeration of JavaScript primitive type identifiers used by the model system.
* @summary References the relevant JS primitives and standardizes their string representations across the library.
* @property {string} STRING references the string primitive
* @property {string} NUMBER references the number primitive
* @property {string} BOOLEAN references the boolean primitive
* @property {string} BIGINT references the bigint primitive
* @enum Primitives
* @readonly
* @memberOf module:decorator-validation
*/
var Primitives;
(function (Primitives) {
/** references the string primitive */
Primitives["STRING"] = "string";
/** references the number primitive */
Primitives["NUMBER"] = "number";
/** references the boolean primitive */
Primitives["BOOLEAN"] = "boolean";
/** references the bigint primitive */
Primitives["BIGINT"] = "bigint";
})(Primitives || (exports.Primitives = Primitives = {}));
/**
* @description Reserved model names which are excluded from model rebuilding.
* @summary References the Reserved model names to ignore during Model rebuilding to avoid interfering with native types and special cases.
* @property {string} STRING
* @property {string} OBJECT
* @property {string} NUMBER
* @property {string} BOOLEAN
* @property {string} BIGINT
* @property {string} DATE
* @enum ReservedModels
* @readonly
* @memberOf module:decorator-validation
*/
exports.ReservedModels = {
/** reserved name for string */
STRING: String,
/** reserved name for object */
OBJECT: Object,
/** reserved name for number */
NUMBER: Number,
/** reserved name for boolean */
BOOLEAN: Boolean,
/** reserved name for bigint */
BIGINT: BigInt,
/** reserved name for Date */
DATE: Date,
};
/**
* @description Basic supported JavaScript types used by the validation system.
* @summary References the basic supported JS types as strings that can be used for type checking and metadata.
* @typedef {Object} JsTypes
* @property {"string"} string String primitive identifier
* @property {"array"} array Array type identifier
* @property {"number"} number Number primitive identifier
* @property {"boolean"} boolean Boolean primitive identifier
* @property {"symbol"} symbol Symbol primitive identifier
* @property {"function"} function Function type identifier
* @property {"object"} object Object type identifier
* @property {"undefined"} undefined Undefined type identifier
* @property {"null"} null Null value identifier
* @property {"bigint"} BIGINT BigInt primitive identifier
* @memberOf module:decorator-validation
*/
exports.jsTypes = [
"string",
"array",
"number",
"boolean",
"symbol",
"function",
"object",
"undefined",
"null",
"bigint",
];
//# sourceMappingURL=constants.js.map