We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's pretty much all in the title, how about this:
alerty.alert(…).then(onOk) alerty.confirm(…).then(ok => ok ? onOk() : onCancel()) // or alerty.confirm(…).then(onOk, onCancel) alerty.prompt(…).then(onOk, onCancel) alerty.toast(…).then(callback)
for backward compatibility it could be an addition, like a namespace alerty.promise, it's actually easy to implement:
alerty.promise
alerty.promise = { alert: (...args) => new Promise(resolve => alerty.alert(...args, resolve)), confirm: (...args) => new Promise((resolve, reject) => alerty.confirm(...args, resolve, reject)), prompt: (...args) => new Promise((resolve, reject) => alerty.prompt(...args, resolve, reject)), toasts: (...args) => new Promise(resolve => alerty.toasts(...args, resolve)) }
The text was updated successfully, but these errors were encountered:
That's awesome. I am ready to rewrite alerty using TypeScript and ES6. Also welcome your ideas and contribution.
Sorry, something went wrong.
No branches or pull requests
It's pretty much all in the title, how about this:
for backward compatibility it could be an addition, like a namespace
alerty.promise
, it's actually easy to implement:The text was updated successfully, but these errors were encountered: