interface NodeWorkerModules

The Node built-ins this host needs. Inject fakes to test without real threads.

Properties

readonly
Worker: new (specifier: string | URL) => NodeWorkerLike

The worker_threads.Worker constructor.

readonly
availableParallelism: () => number

os.availableParallelism.

Usage

import { type NodeWorkerModules } from "runtime/src/index.ts";