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

fix(ext/node): Add Immediate class to mirror NodeJS.Immediate #22808

Merged
merged 2 commits into from
Mar 8, 2024

Conversation

nathanwhit
Copy link
Member

Fixes #21660

Adds a basic Immediate class to mirror NodeJS.Immediate, and changes setImmediate and clearImmediate to return and accept (respectively) Immediate objects.

Note that for now {ref,unref,hasRef} are effectively stubs, as deno_core doesn't really natively support immediates (they're currently modeled as timers with delay of 0). Eventually we probably want to actually implement these properly.

@nathanwhit nathanwhit requested a review from bartlomieju March 8, 2024 20:42
Copy link
Contributor

@mmastrac mmastrac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nathanwhit nathanwhit merged commit 529f795 into denoland:main Mar 8, 2024
17 checks passed
@nathanwhit nathanwhit deleted the immediate-class branch March 8, 2024 23:58
nathanwhit added a commit that referenced this pull request Mar 14, 2024
Fixes #21660

Adds a basic `Immediate` class to mirror `NodeJS.Immediate`, and changes
`setImmediate` and `clearImmediate` to return and accept (respectively)
`Immediate` objects.

Note that for now {ref,unref,hasRef} are effectively stubs, as deno_core
doesn't really natively support immediates (they're currently modeled as
timers with delay of 0). Eventually we probably want to actually
implement these properly.
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

Successfully merging this pull request may close these issues.

TypeError: setImmediate(...).unref is not a function
2 participants