UNPKG

vue-types

Version:
91 lines (88 loc) 3 kB
import { h as VueTypesDefaults, g as VueTypesConfig } from './shared/vue-types.CqspdBQ7.js'; export { c as VueTypeDef, f as VueTypeValidableDef, i as config } from './shared/vue-types.CqspdBQ7.js'; import 'vue'; type TypeShim = <_T = any>(...args: any[]) => any; declare const any: TypeShim; declare const func: TypeShim; declare const bool: () => any; declare const string: TypeShim; declare const number: TypeShim; declare const array: TypeShim; declare const object: TypeShim; declare const symbol: () => any; declare const integer: TypeShim; declare const oneOf: TypeShim; declare const custom: TypeShim; declare const instanceOf: TypeShim; declare const oneOfType: TypeShim; declare const arrayOf: TypeShim; declare const objectOf: TypeShim; declare const shape: TypeShim; declare const nullable: TypeShim; declare function fromType(name: string, source: any, props?: any): any; declare const toValidableType: <T>(name: string, props: any) => any; declare const toType: <T>(name: string, props: any) => any; declare function createTypes(defs?: Partial<VueTypesDefaults>): { new (): {}; defaults: Partial<VueTypesDefaults>; get sensibleDefaults(): boolean | Partial<VueTypesDefaults>; set sensibleDefaults(v: boolean | Partial<VueTypesDefaults>); config: VueTypesConfig; get any(): any; get func(): any; get bool(): any; get string(): any; get number(): any; get array(): any; get object(): any; get symbol(): any; get integer(): any; get nullable(): any; oneOf: TypeShim; custom: TypeShim; instanceOf: TypeShim; oneOfType: TypeShim; arrayOf: TypeShim; objectOf: TypeShim; shape: TypeShim; extend(props: any): any; utils: { toType: (...args: any[]) => any; validate: (...args: any[]) => boolean; }; }; declare function validateType(_type: any, _value: any, _silent?: boolean): string | boolean; declare const VueTypes_base: { new (): {}; defaults: Partial<VueTypesDefaults>; get sensibleDefaults(): boolean | Partial<VueTypesDefaults>; set sensibleDefaults(v: boolean | Partial<VueTypesDefaults>); config: VueTypesConfig; get any(): any; get func(): any; get bool(): any; get string(): any; get number(): any; get array(): any; get object(): any; get symbol(): any; get integer(): any; get nullable(): any; oneOf: TypeShim; custom: TypeShim; instanceOf: TypeShim; oneOfType: TypeShim; arrayOf: TypeShim; objectOf: TypeShim; shape: TypeShim; extend(props: any): any; utils: { toType: (...args: any[]) => any; validate: (...args: any[]) => boolean; }; }; declare class VueTypes/*#__PURE__*/ extends VueTypes_base { } // @ts-ignore export = VueTypes; export { any, array, arrayOf, bool, createTypes, custom, fromType, func, instanceOf, integer, nullable, number, object, objectOf, oneOf, oneOfType, shape, string, symbol, toType, toValidableType, validateType };