Deprecate callbacks and sync api? enforce promise
jimmywarting opened this issue · comments
I think the fewer method you have of solving stuff then the easier it is to maintain.
it would also reduce the amount of documentation needed. making it easer to learn
if everyone where enforced to use the async methods then the easier it would also be to swap it out for something else like a database where the only possibility is to use async network IO or like a spec'ed CookieStore that is only async
Not saying you should rip out the functionality...
- just remove the documentation around sync usage
- update the examples to use
async/await
- add like a jsdoc with
@depricated
At a minimum, all APIs that return a promise should be changed to async functions, so that they are guaranteed to only resolve/reject, not resolve/reject/throw.
Documentation in the README has been updated in #234 to emphasize the promise signatures of methods, where applicable.
We are currently planning on removing callback support in our next major release.