-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
feat: add environment::listen
#18263
feat: add environment::listen
#18263
Conversation
|
I tried this API here: https://github.com/sapphi-red/daienjo-architecture/blob/966c60a5a94dcc388ba163ddbe9f2ba3435b2cbb/environment-pkgs/workerd/index.ts#L89-L290 I had to pass in Other than that, the API worked fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
In your code, it doesn't override init
, so previousInstance
is not used? I think I'll also mostly go with listen -> close
pattern, but maybe someone finds a good use.
Thanks for exploring the different options for the API @sapphi-red! |
Description
The upside of this approach is that this makes the implementation of environments cleaner IMO.
close #18264