UNPKG

@pit-front-end/utils

Version:

湖南创智艾泰克科技有限公司

25 lines (23 loc) 631 B
import { App, Component, PropType } from 'vue'; interface EventShim { new (...args: any[]): { $props: { onClick?: (...args: any[]) => void; }; }; } export type WithInstall<T> = T & { install: (app: App) => void; } & EventShim; export type CustomComponent = Component & { displayName?: string; }; /** * * @param component * @param alias * @returns 返回带有 install 方法的组件对象 */ export declare function withInstall<T extends CustomComponent>(component: T, alias?: string): WithInstall<T>; export declare const definePropType: <T>(val: any) => PropType<T>; export {};