MCPcopy
hub / github.com/Effect-TS/effect / tsWorker

Function tsWorker

packages/platform-node/examples/worker.ts:29–34  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

27}).pipe(Effect.provide(PoolLive), NodeRuntime.runMain)
28
29const tsWorker = (path: string) => {
30 const url = new URL(path, import.meta.url)
31 return new WT.Worker(`import('tsx/esm/api').then(({ register }) => { register(); import('${url.pathname}') })`, {
32 eval: true
33 })
34}

Callers 1

worker.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected