@toreda/strong-types
Version:
Better TypeScript code in fewer lines.
57 lines (55 loc) • 2.45 kB
JavaScript
"use strict";
/**
* MIT License
*
* Copyright (c) 2019 - 2021 Toreda, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.RuleType = void 0;
const array_1 = require("../is/array");
const big_1 = require("../is/big");
const big_int_1 = require("../is/big-int");
const boolean_1 = require("../is/boolean");
const dbl_1 = require("../is/dbl");
const float_1 = require("../is/float");
const int_1 = require("../is/int");
const null_1 = require("../is/null");
const text_1 = require("../is/text");
const uint_1 = require("../is/uint");
/**
* @category Rules
*/
class RuleType {
constructor(rule, mods) {
this.array = (0, array_1.isArrayMake)(this, rule, mods);
this.big = (0, big_1.isBigMake)(this, rule, mods);
this.bigInt = (0, big_int_1.isBigIntMake)(this, rule, mods);
this.boolean = (0, boolean_1.isBooleanMake)(this, rule, mods);
this.dbl = (0, dbl_1.isDblMake)(this, rule, mods);
this.float = (0, float_1.isFloatMake)(this, rule, mods);
this.int = (0, int_1.isIntMake)(this, rule, mods);
this.null = (0, null_1.isNullMake)(this, rule, mods);
this.string = (0, text_1.isTextMake)(this, rule, mods);
this.text = (0, text_1.isTextMake)(this, rule, mods);
this.uint = (0, uint_1.isUIntMake)(this, rule, mods);
}
}
exports.RuleType = RuleType;