@antdv/pro-utils
Version:
@antdv/pro-utils
18 lines (17 loc) • 1.25 kB
TypeScript
import type { PropOptions, VueProp, VueTypeDef, VueTypeValidateDef, WrappedFn } from './types';
type PlainObject = Record<string, any>;
export declare const isPlainObject: (obj: any) => obj is PlainObject;
declare let warn: (msg: string) => void;
export { warn };
export declare const hasOwn: (v: PropertyKey) => boolean;
export declare const isInteger: (number: unknown) => boolean;
export declare function has<T, U extends keyof T>(obj: T, prop: U): boolean;
export declare function toValidateType<T = any>(name: string, obj: PropOptions<T>): VueTypeValidateDef<T>;
export declare function toType<T = any>(name: string, obj: PropOptions<T>): VueTypeDef<T>;
export declare function bindTo(fn: (...args: any[]) => any, ctx: any): WrappedFn;
export declare function isVueTypeDef<T>(value: any, name?: string): value is VueTypeDef<T> | VueTypeValidateDef<T>;
export declare function isComplexType<T>(value: any): value is VueProp<T>;
export declare function getType(fn: VueProp<any> | (() => any) | (new (...args: any[]) => any)): string;
export declare function getNativeType(value: any): string;
export declare function validateType<T, U>(type: T, value: U, silent?: boolean): string | boolean;
export declare function indent(string: string): string;