UNPKG

vue-toastify

Version:

<p align="center">Simple and dependency-free notification plugin.</p>

25 lines (24 loc) 1.17 kB
import type { ContainerMethods, Settings, Status, Toast, ToastOptions } from '../type'; export type CustomMethods = Record<string, (status?: Status, title?: string) => string>; export interface ToastPluginAPI { notify: (status: Status, title?: string) => Toast['id']; success: (status: Status, title?: string) => Toast['id']; info: (status: Status, title?: string) => Toast['id']; warning: (status: Status, title?: string) => Toast['id']; error: (status: Status, title?: string) => Toast['id']; loader: (status: Status, title?: string) => Toast['id']; prompt: <T>(status: Omit<ToastOptions, 'mode' | 'answers'> & { answers: Record<string, T>; }) => Promise<T>; updateToast: (id: Toast['id'], status: ToastOptions) => boolean; settings: (settings?: Settings) => Settings; findToast: <T extends Toast['id']>(id: T) => Toast | undefined; getToasts: () => Toast[]; stopLoader: (id?: Toast['id']) => number; remove: (id?: Toast['id']) => number; } export declare let app: { container: ContainerMethods; }; export declare const toastMethods: ToastPluginAPI; export default function useToast(): ToastPluginAPI;