property
WorkerOptions.env
env?: Record<string, string> | typeof SHARE_ENV
If set, the initial value of process.env inside the Worker thread. Pass worker.SHARE_ENV from node:worker_threads to share environment variables between the parent and worker threads; changes to one thread's process.env then affect the other thread as well. Default: process.env.