import { P as PropOptions, V as VueTypeDef, a as VueTypeValidableDef, I as InferType, b as ValidatorFunction, c as VueProp, d as Prop, C as Constructor, e as VueTypeShape, f as VueTypesDefaults, g as VueTypesConfig } from './shared/vue-types.d8e57a80.js'; export { i as VueTypeLooseShape, h as config } from './shared/vue-types.d8e57a80.js'; import 'vue'; /** * Validates a given value against a prop type object. * * If `silent` is `false` (default) will return a boolean. If it is set to `true` * it will return `true` on success or a string error message on failure * * @param {Object|*} type - Type to use for validation. Either a type object or a constructor * @param {*} value - Value to check * @param {boolean} silent - Silence warnings */ declare function validateType(type: T, value: U, silent?: boolean): string | boolean; /** * Adds `isRequired` and `def` modifiers to an object * * @param {string} name - Type internal name * @param {object} obj - Object to enhance */ declare function toType(name: string, obj: PropOptions): VueTypeDef; /** * Like `toType` but also adds the `validate()` method to the type object * * @param {string} name - Type internal name * @param {object} obj - Object to enhance */ declare function toValidableType(name: string, obj: PropOptions): VueTypeValidableDef; /** * Return a new VueTypes type using another type as base. * * Properties in the `props` object will overwrite those defined in the source one * expect for the `validator` function. In that case both functions will be executed in series. * * @param name - Name of the new type * @param source - Source type * @param props - Custom type properties */ declare function fromType>(name: string, source: T): T; declare function fromType, V extends PropOptions>>(name: string, source: T, props: V): Omit & V; declare const any: () => VueTypeValidableDef>; declare const func: any>() => VueTypeValidableDef>; declare const bool: () => VueTypeValidableDef>; declare const string: () => VueTypeValidableDef>; declare const number: () => VueTypeValidableDef>; declare const array: () => VueTypeValidableDef>; declare const object: >() => VueTypeValidableDef>; declare const integer: () => VueTypeDef; declare const symbol: () => VueTypeDef; declare const nullable: () => PropOptions; declare function custom(validatorFn: ValidatorFunction, warnMsg?: string): VueTypeDef; declare function oneOf(arr: T): VueTypeDef; declare function oneOfType | Prop = any, V = InferType>(arr: U[]): VueTypeDef; declare function arrayOf | Prop>(type: T): VueTypeDef[]>; declare function instanceOf(instanceConstructor: C): VueTypeDef>; declare function objectOf | Prop>(type: T): VueTypeDef>>; declare function shape(obj: { [K in keyof T]: Prop | VueProp; }): VueTypeShape; declare function createTypes(defs?: Partial): { new (): {}; defaults: Partial; sensibleDefaults: boolean | Partial; config: VueTypesConfig; readonly any: VueTypeValidableDef>; readonly func: VueTypeValidableDef<(...args: any[]) => any, ValidatorFunction<(...args: any[]) => any>> & { default: (...args: any[]) => any; }; readonly bool: VueTypeValidableDef>; readonly string: VueTypeValidableDef> & { default: string; }; readonly number: VueTypeValidableDef> & { default: number; }; readonly array: VueTypeValidableDef> & { default: () => unknown[]; }; readonly object: VueTypeValidableDef, ValidatorFunction>> & { default: () => Record; }; readonly integer: VueTypeDef & { default: number; }; readonly symbol: VueTypeDef; readonly nullable: PropOptions; readonly custom: typeof custom; readonly oneOf: typeof oneOf; readonly instanceOf: typeof instanceOf; readonly oneOfType: typeof oneOfType; readonly arrayOf: typeof arrayOf; readonly objectOf: typeof objectOf; readonly shape: typeof shape; extend(...args: any[]): void; utils: { validate(value: T, type: U): boolean; toType(name: string, obj: PropOptions, validable?: Validable): Validable extends true ? VueTypeValidableDef : VueTypeDef; }; }; declare const VueTypes_base: { new (): {}; defaults: Partial; sensibleDefaults: boolean | Partial; config: VueTypesConfig; readonly any: VueTypeValidableDef>; readonly func: VueTypeValidableDef<(...args: any[]) => any, ValidatorFunction<(...args: any[]) => any>> & { default: (...args: any[]) => any; }; readonly bool: VueTypeValidableDef>; readonly string: VueTypeValidableDef> & { default: string; }; readonly number: VueTypeValidableDef> & { default: number; }; readonly array: VueTypeValidableDef> & { default: () => unknown[]; }; readonly object: VueTypeValidableDef, ValidatorFunction>> & { default: () => Record; }; readonly integer: VueTypeDef & { default: number; }; readonly symbol: VueTypeDef; readonly nullable: PropOptions; readonly custom: typeof custom; readonly oneOf: typeof oneOf; readonly instanceOf: typeof instanceOf; readonly oneOfType: typeof oneOfType; readonly arrayOf: typeof arrayOf; readonly objectOf: typeof objectOf; readonly shape: typeof shape; extend(...args: any[]): void; utils: { validate(value: T, type: U): boolean; toType(name: string, obj: PropOptions, validable?: Validable): Validable extends true ? VueTypeValidableDef : VueTypeDef; }; }; declare class VueTypes/*#__PURE__*/ extends VueTypes_base { } type VueTypesInterface = ReturnType; export { VueTypeDef, VueTypeShape, VueTypeValidableDef, type VueTypesInterface, any, array, arrayOf, bool, createTypes, custom, VueTypes as default, fromType, func, instanceOf, integer, nullable, number, object, objectOf, oneOf, oneOfType, shape, string, symbol, toType, toValidableType, validateType };