import { PropType } from 'vue'; /** * vue props用于推导自定义类型的辅助函数 * @example * props: { * seg: customPropsType(), // 非空,自定义接口 * getState: customPropsType<(id: number) => ArchState>(false), // 可空,函数 * enable: customPropsType(false, Boolean) // 可空,运行时类型检查, * direction: customPropType((): 'vertical' | 'horizontal' => 'horizontal') // 默认参数 * } * @param required 参数必填 默认true * @param type 传入构造函数进行动态检查 */ export declare function customPropType(required?: true, type?: PropType): { type: PropType; required: true; }; export declare function customPropType(required: boolean, type?: PropType): { type: PropType; }; export declare function customPropType(factory: () => T): { default: T; };