Skip to content

feat(unstable): use Node.js setTimeout and setInterval #29993

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Jul 3, 2025

This commit repurposes --unstable-node-globals flag that was deprecated
in #29887 to switch out timers implemention
that is used.

Ie. using this flag cause setTimeout, setInterval, clearTimeout and clearInterval
globals to use functions from node:timers module instead of the Web version.

This is also enabled using DENO_COMPAT=1 env var.

TODO:
make typechecking be conditional depending on this, most likely requires
changes in our TS fork.

Towards #29703

Copy link
Member

Choose a reason for hiding this comment

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

make typechecking be conditional depending on this, most likely requires
changes in our TS fork.

Search for ts.deno.setNodeOnlyGlobalNames

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.

2 participants