Skip to content

Commit 587deac

Browse files
jasnelltargos
authored andcommitted
tools: add Worker to type-parser
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #38659 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
1 parent 99735a6 commit 587deac

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

test/parallel/test-worker-event.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ const common = require('../common');
44
const assert = require('assert');
55
const {
66
Worker,
7+
threadId: parentThreadId,
78
} = require('worker_threads');
89

910
process.on('worker', common.mustCall(({ threadId }) => {
10-
assert.strictEqual(threadId, 1);
11+
assert.strictEqual(threadId, parentThreadId + 1);
1112
}));
1213

1314
new Worker('', { eval: true });

tools/doc/type-parser.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ const customTypesMap = {
175175
'vm.SourceTextModule': 'vm.html#vm_class_vm_sourcetextmodule',
176176

177177
'MessagePort': 'worker_threads.html#worker_threads_class_messageport',
178+
'Worker': 'worker_threads.html#worker_threads_class_worker',
178179

179180
'zlib options': 'zlib.html#zlib_class_options',
180181
};

0 commit comments

Comments
 (0)