-
Notifications
You must be signed in to change notification settings - Fork 287
promises support #59
Comments
Support for promises is planned and will be added soon. |
@chrisdukakis makes sense. Thanks for a quick response. |
In the mean time you can use https://github.com/jimthedev/iotap which tries to promisify the existing api. It is quite small (a single fn) and PRs are of course welcome. |
See #89 |
If we're introducing promises, how about taking it a step further with full |
@jkoudys if it's returning a promise you can await it. There's no extra step a library needs to make to allow async/await. |
@capaj I was referring to using async/await in the project code itself, instead of building promises the old fashioned way. Since there's no transpiling happening yet when building for |
@capaj @jkoudys first of all, thanks for keeping this conversation going! Promise support is available in the |
@anyong I am not sure why you'd say that bluebird is incompatible with async/await. async/await doesn't care whether the promise is native or bluebird. If it has methods |
@capaj if you try to import a custom promise (and name it
There are various issues around the TypeScript repo with possible fixes: microsoft/TypeScript#8331 The considerations for sticking with Promise were:
You will be able to |
thanks for clarification |
@capaj would you be OK with closing this issue now or is there anything else we should discuss here? |
well best practice is to close this when "next" branch is published to npm as the latest version, but I can live with this being closed now 💪 |
Promises on next or master are here to stay, I promise! |
I prefer to write my JS with async/await and the readme only shows callback style. So I have to ask-is there no planned support for promises?
I already created a similar issue here:
iotaledger/iota.crypto.js#4
but it would be great to have it in both.
The text was updated successfully, but these errors were encountered: