Skip to content

Commit edc9ceb

Browse files
leebyrontargos
authored andcommitted
doc: fix issue with worker_threads docs
This example function returns a promise directly rather than implicitly via async/await. PR-URL: #25712 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent c82f244 commit edc9ceb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/worker_threads.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const {
2525
} = require('worker_threads');
2626

2727
if (isMainThread) {
28-
module.exports = async function parseJSAsync(script) {
28+
module.exports = function parseJSAsync(script) {
2929
return new Promise((resolve, reject) => {
3030
const worker = new Worker(__filename, {
3131
workerData: script

0 commit comments

Comments
 (0)