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 May 17, 2021
1 parent c182198 commit ec8ab22
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.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',

Expand Down

0 comments on commit ec8ab22

Please sign in to comment.