diff --git a/src/types.ts b/src/types.ts index 3d26c7c..51eec33 100644 --- a/src/types.ts +++ b/src/types.ts @@ -5,9 +5,9 @@ export type ToastTypes = 'normal' | 'action' | 'success' | 'info' | 'warning' | export type PromiseT = Promise | (() => Promise); export type PromiseData = ExternalToast & { - loading: string | React.ReactNode; - success: string | React.ReactNode | ((data: ToastData) => React.ReactNode | string); - error: string | React.ReactNode | ((error: any) => React.ReactNode | string); + loading?: string | React.ReactNode; + success?: string | React.ReactNode | ((data: ToastData) => React.ReactNode | string); + error?: string | React.ReactNode | ((error: any) => React.ReactNode | string); finally?: () => void | Promise; };