UNPKG

vue-ts-types

Version:

Lightweight TypeScript-first Vue prop type definitions

13 lines (12 loc) 677 B
export type Validator = (value: unknown) => string | undefined; export type VuePropValidator = (value: unknown) => boolean; /** * Creates a Vue prop validator that runs all type validators and the user validator (if specified). * @param userValidator Validator function specified by the user. * @param typeValidators Validator functions hard-coded by the prop type function. */ export declare function vuePropValidator(userValidator?: Validator, ...typeValidators: Validator[]): VuePropValidator | undefined; export { isInstanceOf } from './isInstanceOf'; export { isInteger } from './isInteger'; export { isOneOf } from './isOneOf'; export { isSymbol } from './isSymbol';