Coconstructor
Bun

constructor

worker_threads.Worker.constructor

Not implemented in Bun

constructor Worker(
filename: string | URL,
options?: WorkerOptions
): Worker;
@param filename

The path to the Worker’s main script or module. Must be either an absolute path or a relative path (i.e. relative to the current working directory) starting with ./ or ../, or a WHATWG URL object using file: protocol. If options.eval is true, this is a string containing JavaScript code rather than a path.