UNPKG

vue-ts-types

Version:

Lightweight TypeScript-first Vue prop type definitions

11 lines (10 loc) 597 B
import type { PropOptionsGenerator, PropType } from '../types'; import type { Validator } from '../validators'; /** * Allows any of the passed constructor types (validated at runtime). * * @template T - has to be used to adjust the type at compile time. * @param type - A single constructor or an array of constructors to allow. * @param validator - Optional function for further runtime validation; should return `undefined` if valid, or an error string if invalid. */ export declare const oneOfTypesProp: <T = unknown>(type: PropType<T>, validator?: Validator) => PropOptionsGenerator<T>;