tools: add Worker to type-parser

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/38659
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
This commit is contained in:
James M Snell authored and Michaël Zasso committed 2021-05-17 09:11:36 +02:00
1 parent c182198c44
commit ec8ab22ce6
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -4,10 +4,11 @@ const common = require('../common');
const assert = require('assert');
const {
Worker,
threadId: parentThreadId,
} = require('worker_threads');
process.on('worker', common.mustCall(({ threadId }) => {
assert.strictEqual(threadId, 1);
assert.strictEqual(threadId, parentThreadId + 1);
}));
new Worker('', { eval: true });
+1
View File
@@ -223,6 +223,7 @@ const customTypesMap = {
'vm.SourceTextModule': 'vm.html#vm_class_vm_sourcetextmodule',
'MessagePort': 'worker_threads.html#worker_threads_class_messageport',
'Worker': 'worker_threads.html#worker_threads_class_worker',
'X509Certificate': 'crypto.html#crypto_class_x509certificate',