Skip to content

fix(cloudflare-runtime): keep typed error/requirement channels in RemoteWorker dts#71

Merged
john-royal merged 1 commit into
mainfrom
feat/typed-remote-worker-dts
Jul 17, 2026
Merged

fix(cloudflare-runtime): keep typed error/requirement channels in RemoteWorker dts#71
john-royal merged 1 commit into
mainfrom
feat/typed-remote-worker-dts

Conversation

@sam-goodwin

Copy link
Copy Markdown
Contributor

Annotate RemoteWorker.make/layer with explicit types so the generated declarations keep their error/requirement channels.

The dts bundler cannot name the inferred Credentials requirement from @distilled.cloud/cloudflare and degraded both exports — and everything composed from them, e.g. RuntimeServices.layerRuntime — to any, any:

// before (dist/node/RuntimeServices.d.mts)
declare const layerRuntime: (config: RuntimeConfig) => Layer.Layer<..., any, any>;

// after
declare const layerRuntime: (config: RuntimeConfig) => Layer.Layer<
  ...,
  ConfigError | PlatformError | SystemError,
  ChildProcessSpawner | Credentials | FileSystem | HttpClient | Path
>;

Found while embedding this repo as a workspace in the alchemy monorepo, where the any requirement channel failed Effect.runPromise type-checks in cloudflare-vite-plugin's dev-server.ts.

🤖 Generated with Claude Code

…s typed error/requirement channels

The dts bundler cannot name the inferred Credentials requirement from
@distilled.cloud/cloudflare and degraded make/layer (and everything
composed from them, e.g. RuntimeServices.layerRuntime) to any/any.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alchemy-version-bot

Copy link
Copy Markdown
Contributor

Install the packages built from this commit:

@distilled.cloud/cloudflare-rolldown-plugin

bun add https://pkg.distilled.cloud/cloudflare-rolldown-plugin/c09ef1d

@distilled.cloud/cloudflare-runtime

bun add https://pkg.distilled.cloud/cloudflare-runtime/c09ef1d

@distilled.cloud/cloudflare-vite-plugin

bun add https://pkg.distilled.cloud/cloudflare-vite-plugin/c09ef1d

@john-royal
john-royal merged commit 02939aa into main Jul 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants