UNPKG

variable-type

Version:

Runtime type checking for variable and similar objects.

25 lines 645 B
"use strict"; /** * Created by hustcc on 17/08/01. */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var or_1 = __importDefault(require("./or")); var typeOf_1 = __importDefault(require("./typeOf")); /** * convert a type into optional. * 扩展运算,可选的校验 * @param type * @returns Type */ function default_1(type) { return or_1.default([ type, typeOf_1.default('undefined') ]); } exports.default = default_1; ; //# sourceMappingURL=optional.js.map