Skip to content

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

@johtso

Description

@johtso

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions