Closed michaelpomogajko closed 1 month ago
Describe the bug In original sonner, the error callback of a promise can also take a function with the rejected error as parameter.
To Reproduce
toast.promise( new Promise((resolve, reject) => { setTimeout(() => { reject(new Error('Nah')); }, 1000); }), { loading: 'Loading..', success: (result: string) => `Resolved: ${result}`, error: (error: Error) => `Rejected: ${error.message}`, }
Expected behavior Types should allow this, as well as functionality should mimic original sonner
Environment info
hello! i've opened a PR that should cover that feature
Releasing the fix in an hour or so, closed
Describe the bug In original sonner, the error callback of a promise can also take a function with the rejected error as parameter.
To Reproduce
Expected behavior Types should allow this, as well as functionality should mimic original sonner
Environment info