kbrgl / svelte-french-toast

🍞🥂 Buttery smooth toast notifications for Svelte
https://svelte-french-toast.vercel.app/
MIT License
809 stars 28 forks source link

include type definition for arrow functions returning a string as ren… #27

Closed shiftlabs1 closed 1 year ago

shiftlabs1 commented 1 year ago

include type definition for arrow functions returning a string as renderable, as described in the documentation. So that usage of the type

toast.promise(utilsStore.addToWaitList($form.email.value), {
            loading: 'Adding to Waitlist, please wait...',
            success: (data: any) => `Adding ${data} to the waitlist!!.Please look out for our mails`,
            error: (err:any) => `Oops, an error occured. ${err}. Please try again`
})

does not give type error on (success and error)

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
svelte-french-toast ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 11, 2023 at 3:45PM (UTC)
kbrgl commented 1 year ago

This issue was fixed in #25, but the changes haven't been published on NPM yet.