node/test/fixtures/klass-with-fields.js

19 lines
266 B
JavaScript
Raw Permalink Normal View History

'use strict';
const {
parentPort,
isMainThread
} = require('node:worker_threads');
class Klass {
numeric = 1234;
nonNumeric = 'test';
}
globalThis.obj = new Klass();
if (!isMainThread) {
parentPort.postMessage('ready');
setInterval(() => {}, 100);
}