Skip to content

Conversation

@dmmulroy
Copy link
Contributor

Summary

Use key remapping (as clause) to filter out symbol keys instead of mapping them to never. Fixes Disposable compatibility issue with RPC types.

Context

Per @kentonv's review comment on cloudflare/workerd#5804 - applying the same fix here.

Change

- [K in keyof T]: K extends number | string ? RpcCompatible<T[K]> : never;
+ [K in keyof T as K extends string | number ? K : never]: RpcCompatible<T[K]>;

Note

This PR was written with AI assistance.

AI Session Export

{
  "info": {
    "title": "capnweb rpccompatible symbol fix",
    "agent": "opencode",
    "models": ["claude opus 4.5"]
  },
  "summary": [
    "user requested review of workerd PR #5804",
    "agent fetched PR details and Kenton's comment about updating capnweb",
    "agent cloned capnweb to ~/Code/work/ using jj",
    "agent applied same RpcCompatible fix to src/types.d.ts",
    "agent created PR referencing workerd#5804"
  ]
}

@changeset-bot
Copy link

changeset-bot bot commented Jan 16, 2026

🦋 Changeset detected

Latest commit: 781c775

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
capnweb Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 16, 2026

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/capnweb@129

commit: 781c775

@dmmulroy
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@dmmulroy dmmulroy force-pushed the fix-rpccompatible-symbol-keys branch from b6b49b3 to 8bb2fb9 Compare January 16, 2026 15:54
github-actions bot added a commit that referenced this pull request Jan 16, 2026
@kentonv
Copy link
Member

kentonv commented Jan 20, 2026

Hmm it appears you ran some sort of auto-formatter on this file and it added some extraneous diffs, can you reduce it to just the intended change please?

(Cap'n Web doesn't currently use auto-formatting because I personally can't stand them but I imagine someone will insist on adding one at some point and I will relent... but for the moment, there isn't one.)

@dmmulroy
Copy link
Contributor Author

ah yeah that likely happened, will fix up.

Use key remapping to filter out symbol keys instead of mapping to never.
Fixes Disposable compatibility issue with RPC types.

Ref: cloudflare/workerd#5804
@dmmulroy dmmulroy force-pushed the fix-rpccompatible-symbol-keys branch from 8bb2fb9 to 781c775 Compare January 21, 2026 00:09
@dmmulroy
Copy link
Contributor Author

done 🫡

@kentonv kentonv merged commit 10abaf3 into cloudflare:main Jan 21, 2026
4 checks passed
@github-actions github-actions bot mentioned this pull request Jan 21, 2026
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