@determaer/vue-use-modal
Version:
This library was created to simplify utilization process of modal windows in Vue applications with use of async components.
43 lines (35 loc) • 1.52 kB
TypeScript
import { Component } from 'vue';
import { ComponentOptionsMixin } from 'vue';
import { ComponentProvideOptions } from 'vue';
import { DefineComponent } from 'vue';
import { PublicProps } from 'vue';
declare const __VLS_component: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
close: (...args: any[]) => void;
}, string, PublicProps, Readonly<{}> & Readonly<{
onClose?: ((...args: any[]) => any) | undefined;
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: {
default?(_: {}): any;
};
refs: {};
rootEl: HTMLDivElement;
};
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};
export declare const Modal: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export declare function useModal<ReturnT extends object = Record<string, unknown>, AttrsT extends object = Record<string, unknown>, ModalAttrsT extends object = Record<string, unknown>>({ component, loadingComponent, errorComponent, timeout, attrs, Modal, modalAttrs, }: {
component: Promise<Component>;
loadingComponent?: Component;
errorComponent?: Component;
timeout?: number;
attrs?: AttrsT;
Modal: Component;
modalAttrs?: ModalAttrsT;
}): Promise<ReturnT | boolean>;
export { }