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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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‎

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

2727
if (isMainThread){
28-
module.exports=asyncfunctionparseJSAsync(script){
28+
module.exports=functionparseJSAsync(script){
2929
returnnewPromise((resolve, reject) =>{
3030
constworker=newWorker(__filename,{
3131
workerData: script

0 commit comments

Comments
(0)