We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://nodejs.org/docs/latest/api/process.html#when-to-use-queuemicrotask-vs-processnexttick
CJS
const { nextTick } = require('node:process'); Promise.resolve().then(() => console.log(2)); queueMicrotask(() => console.log(3)); nextTick(() => console.log(1)); // Output: // 1 // 2 // 3
ESM
Expected: For ESM the output should be:
// 2 // 3 // 1
Because ESM module is already a microtask.
Actual: The output is identical for CJS and ESM.
The text was updated successfully, but these errors were encountered:
Thanks for reporting the issue, this is a duplicate of #45048 and there is a stale PR - #45093
Sorry, something went wrong.
Ok, thank you, good to know it.
No branches or pull requests
Affected URL(s)
https://nodejs.org/docs/latest/api/process.html#when-to-use-queuemicrotask-vs-processnexttick
Description of the problem
CJS
ESM
Expected:
For ESM the output should be:
Because ESM module is already a microtask.
Actual:
The output is identical for CJS and ESM.
The text was updated successfully, but these errors were encountered: