◐ Shell
clean mode source ↗

doc: fix reference to workerData in worker_threads · nodejs/node@dd2fc90

Original file line numberDiff line numberDiff line change

@@ -312,7 +312,7 @@ if (isMainThread) {

312312

* `options` {Object}

313313

* `eval` {boolean} If true, interpret the first argument to the constructor

314314

as a script that is executed once the worker is online.

315-

* `data` {any} Any JavaScript value that will be cloned and made

315+

* `workerData` {any} Any JavaScript value that will be cloned and made

316316

available as [`require('worker_threads').workerData`][]. The cloning will

317317

occur as described in the [HTML structured clone algorithm][], and an error

318318

will be thrown if the object cannot be cloned (e.g. because it contains