effect-io-ai

Package: @effect/platform-browser
Module: BrowserWorkerRunner

BrowserWorkerRunner.layer

Layer that provides a browser WorkerRunnerPlatform using the global self worker context.

When to use

Use when you need a browser worker entry point to use the ambient self object as the worker transport.

Details

Delegates to make(self) and provides the runner-side platform used by protocols such as RpcServer.layerProtocolWorkerRunner.

Gotchas

This layer depends on the browser worker global self. Use layerMessagePort when the transport is an explicit MessagePort or Window.

See

Signature

declare const layer: Layer.Layer<WorkerRunner.WorkerRunnerPlatform, never, never>

Source

Since v4.0.0