interface Action { text: string; callback?: ActionCallback; } type Message = string | HTMLElement; type ActionCallback = (toast: Toast) => void; interface ToastOptions { /** * Automatically destroy the toast in specific timeout (ms) * @default `0` which means would not automatically destroy the toast */ timeout?: number; /** * Toast type * @default `default` */ type?: 'success' | 'error' | 'warning' | 'dark' | 'default'; action?: Action; cancel?: string; } declare class Toast { message: Message; options: ToastOptions; el?: HTMLDivElement; private timeoutId?; constructor(message: Message, options?: ToastOptions); insert(): void; destroy(): void; /** * @deprecated Please use `destroy` */ destory(): void; setContainer(): void; startTimer(): void; stopTimer(): void; } declare function createToast(message: Message, options?: ToastOptions): Toast; declare function destroyAllToasts(): void; /** * @deprecated Please use `destroyAllToasts` */ declare function destoryAllToasts(): void; export { Action, ActionCallback, Message, Toast, ToastOptions, createToast, destoryAllToasts, destroyAllToasts };