UNPKG

vue-ts-types

Version:

Lightweight TypeScript-first Vue prop type definitions

13 lines (12 loc) 552 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.anyProp = void 0; const utilities_1 = require("../utilities"); /** * Allows any type. No built-in runtime validation is performed by default. * * @template T - can be used to restrict the type at compile time. * @param validator - Optional function for runtime validation; should return `undefined` if valid, or an error string if invalid. */ const anyProp = (validator) => (0, utilities_1.propOptionsGenerator)(undefined, validator); exports.anyProp = anyProp;