File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2534,7 +2534,8 @@ The [`queueMicrotask()`][] API is an alternative to `process.nextTick()` that
25342534also defers execution of a function using the same microtask queue used to
25352535execute the then, catch, and finally handlers of resolved promises. Within
25362536Node.js, every time the "next tick queue" is drained, the microtask queue
2537- is drained immediately after.
2537+ is drained immediately after. Note that ` process .nextTick ()` is scheduled
2538+ differently depending on the module type being used.
25382539
25392540` ` ` mjs
25402541import { nextTick } from ' node:process' ;
@@ -2543,9 +2544,9 @@ Promise.resolve().then(() => console.log(2));
25432544queueMicrotask (() => console .log (3 ));
25442545nextTick (() => console .log (1 ));
25452546// Output:
2546- // 1
25472547// 2
25482548// 3
2549+ // 1
25492550` ` `
25502551
25512552` ` ` cjs
You can’t perform that action at this time.
0 commit comments