UNPKG

vue-ts-types

Version:

Lightweight TypeScript-first Vue prop type definitions

13 lines (12 loc) 547 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.integerProp = void 0; const utilities_1 = require("../utilities"); const validators_1 = require("../validators"); /** * Allows any integer (validated at runtime). * * @param validator - Optional function for further runtime validation; should return `undefined` if valid, or an error string if invalid. */ const integerProp = (validator) => (0, utilities_1.propOptionsGenerator)(Number, validator, validators_1.isInteger); exports.integerProp = integerProp;