Skip to content
New issue

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

Deprecate callbacks and sync api? enforce promise #229

Open
jimmywarting opened this issue Jan 23, 2022 · 2 comments
Open

Deprecate callbacks and sync api? enforce promise #229

jimmywarting opened this issue Jan 23, 2022 · 2 comments
Milestone

Comments

@jimmywarting
Copy link

jimmywarting commented Jan 23, 2022

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
@wjhsf
Copy link
Contributor

wjhsf commented Mar 1, 2022

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.

@wjhsf
Copy link
Contributor

wjhsf commented May 24, 2022

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.

@wjhsf wjhsf added this to the v6 milestone Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants