UNPKG

vue-ts-types

Version:

Lightweight TypeScript-first Vue prop type definitions

12 lines (11 loc) 470 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.dateProp = void 0; const util_1 = require("../util"); /** * Allows any `Date` object (validated at runtime and compile time). * * @param validator - Optional function for further runtime validation; should return `undefined` if valid, or an error string if invalid. */ const dateProp = (validator) => (0, util_1.propOptionsGenerator)(Date, validator); exports.dateProp = dateProp;