beyonk-group / svelte-notifications

Svelte toast notifications component that can be used in any JS application
309 stars 24 forks source link

Timeout parameter for notifications shouldn't be required #29

Closed mcmxcdev closed 1 year ago

mcmxcdev commented 2 years ago

The types for TNotifier are e.g. success(message: string, timeout: number): void, which doesn't make sense since timeout has a defined default and user doesn't change it very often on a per-use basis IMO.

Also, most of the basic examples from the README.md don't even conform to these typings, and wouldn't pass TS compilation.

antony commented 2 years ago

Do you know how to fix these? I'm very green on TypeScript, so wouldn't really be able to address it myself.

mcmxcdev commented 2 years ago

I provided a PR for this ;)