function-call.d.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import type { ToastType, ToastOptions, ToastWrapperInstance } from './types';
  2. /**
  3. * Display a text toast
  4. */
  5. export declare function showToast(options?: string | ToastOptions): ToastWrapperInstance;
  6. /**
  7. * Display a loading toast
  8. */
  9. export declare const showLoadingToast: (options: string | ToastOptions) => ToastWrapperInstance;
  10. /**
  11. * Display a success toast
  12. */
  13. export declare const showSuccessToast: (options: string | ToastOptions) => ToastWrapperInstance;
  14. /**
  15. * Display a fail toast
  16. */
  17. export declare const showFailToast: (options: string | ToastOptions) => ToastWrapperInstance;
  18. /**
  19. * Close the currently displayed toast
  20. */
  21. export declare const closeToast: (all?: boolean) => void;
  22. /**
  23. * Modify the default configuration that affects all `showToast` calls.
  24. * Specify the `type` parameter to modify the default configuration of a specific type of toast
  25. */
  26. export declare function setToastDefaultOptions(options: ToastOptions): void;
  27. export declare function setToastDefaultOptions(type: ToastType, options: ToastOptions): void;
  28. /**
  29. * Reset the default configuration that affects all `showToast` calls.
  30. * Specify the `type` parameter to reset the default configuration of a specific type of toast
  31. */
  32. export declare const resetToastDefaultOptions: (type?: ToastType) => void;
  33. /**
  34. * Allow multiple toasts to be displayed as the same time
  35. */
  36. export declare const allowMultipleToast: (value?: boolean) => void;