UNPKG

faim

Version:

Element Plus & Element UI isomorphic UI component library, more than Element.

25 lines (24 loc) 1.78 kB
import type { SweetAlertIcon, SweetAlertOptions, SweetAlertResult } from 'sweetalert2'; import Swal from 'sweetalert2'; type Awaited<T> = T extends Promise<infer U> ? U : T; declare function success<T = any>(options: SweetAlertOptions): Promise<SweetAlertResult<Awaited<T>>>; declare function success<T = any>(title?: string, html?: string, icon?: SweetAlertIcon): Promise<SweetAlertResult<Awaited<T>>>; declare function info<T = any>(options: SweetAlertOptions): Promise<SweetAlertResult<Awaited<T>>>; declare function info<T = any>(title?: string, html?: string, icon?: SweetAlertIcon): Promise<SweetAlertResult<Awaited<T>>>; declare function warning<T = any>(options: SweetAlertOptions): Promise<SweetAlertResult<Awaited<T>>>; declare function warning<T = any>(title?: string, html?: string, icon?: SweetAlertIcon): Promise<SweetAlertResult<Awaited<T>>>; declare function error<T = any>(options: SweetAlertOptions): Promise<SweetAlertResult<Awaited<T>>>; declare function error<T = any>(title?: string, html?: string, icon?: SweetAlertIcon): Promise<SweetAlertResult<Awaited<T>>>; declare function confirm<T = any>(options: SweetAlertOptions): Promise<SweetAlertResult<Awaited<T>>>; declare function confirm<T = any>(title?: string, html?: string, icon?: SweetAlertIcon): Promise<SweetAlertResult<Awaited<T>>>; declare function loading<T = any>(options: SweetAlertOptions): Promise<SweetAlertResult<Awaited<T>>>; declare function loading<T = any>(title?: string, html?: string, icon?: SweetAlertIcon): Promise<SweetAlertResult<Awaited<T>>>; declare const _default: typeof Swal & { success: typeof success; warning: typeof warning; info: typeof info; error: typeof error; confirm: typeof confirm; loading: typeof loading; }; export default _default;