Skip to content

Commit

Permalink
tools: add Worker to type-parser
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jasnell authored and targos committed Sep 4, 2021
1 parent 99735a6 commit 587deac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-worker-event.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions tools/doc/type-parser.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,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',

'zlib options': 'zlib.html#zlib_class_options',
};
Expand Down

0 comments on commit 587deac

Please sign in to comment.