UNPKG

jv3-loader

Version:

easy loading overlay by cdnagroup

33 lines (32 loc) 933 B
import { App as VueApp } from "vue"; /** * Interface for the Loader functionality. */ interface LoaderFunction { /** * Adds a task to be executed and manages loading state. * @param task - A function that returns a Promise. */ add: (task: () => Promise<any>) => void; /** * Indicates if any tasks are currently loading. * @returns {boolean} - True if loading, false otherwise. */ isLoading: boolean; } /** * Custom hook to use the loader in components. * @returns {LoaderFunction | undefined} - The loader instance or undefined if not available. */ export declare function useLoader(): LoaderFunction | undefined; /** * Vue plugin installation method for the loader. */ declare const _default: { /** * Installs the loader plugin into a Vue application. * @param app - The Vue application instance. */ install(app: VueApp): void; }; export default _default;