Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workers RPC Typescript documentation should make it clear that you need to use "experimental" types #13899

Open
johtso opened this issue Apr 7, 2024 · 0 comments
Assignees
Labels
content:edit Request for content edits documentation Documentation edits product:workers Related to Workers product

Comments

@johtso
Copy link
Contributor

johtso commented Apr 7, 2024

Existing documentation URL(s)

https://developers.cloudflare.com/workers/runtime-apis/rpc/typescript/

What changes are you suggesting?

Mention in the Workers RPC Typescript documentation that you should use @cloudflare/workers-types/experimental.

Additional information

Spent a long time trying to figure out why I couldn't get the types to work with the new RPC functionality, I would always get:

Type 'PdfParserService' does not satisfy the constraint 'WorkerEntrypointBranded'.
  Property '[__WORKER_ENTRYPOINT_BRAND]' is missing in type 'PdfParserService' but required in type 'WorkerEntrypointBranded'.ts(2344)

Switching to @cloudflare/workers-types/experimental immediately fixed the issue.

@johtso johtso added content:edit Request for content edits documentation Documentation edits labels Apr 7, 2024
@github-actions github-actions bot added the product:workers Related to Workers product label Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:edit Request for content edits documentation Documentation edits product:workers Related to Workers product
Projects
None yet
Development

No branches or pull requests

4 participants