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

Integrate with async_hooks #9

Open
aleclarson opened this issue Oct 20, 2024 · 0 comments
Open

Integrate with async_hooks #9

aleclarson opened this issue Oct 20, 2024 · 0 comments
Labels
idea (not planned) This may or may not be implemented

Comments

@aleclarson
Copy link
Contributor

aleclarson commented Oct 20, 2024

By taking advantage of the async_hooks API, users of jumpgen would be able to import the API from jumpgen/async_hooks instead of destructuring or passing around the context object within the generator.

There are two benefits I see to using async_hooks (more specifically, AsyncLocalStorage).

  1. Import auto-completion in IDEs
  2. Allow functions declared outside the generator to use jumpgen APIs, without having to pass it as an explicit argument
@aleclarson aleclarson added planned This will be added at some point. PR welcome idea (not planned) This may or may not be implemented and removed planned This will be added at some point. PR welcome labels Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea (not planned) This may or may not be implemented
Projects
None yet
Development

No branches or pull requests

1 participant