cloudflare · Cloudflare Workers Docs
Workers TypeScript
How to use wrangler types to generate runtime TypeScript types for Worker RPC methods, Durable Object namespaces, and the env object to ensure type safety between clients and services.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers TypeScript
How to use wrangler types to generate runtime TypeScript types for Worker RPC methods, Durable Object namespaces, and the env object to ensure type safety between clients and services.
When To Use
Use when you need to generate type-safe client stubs for Worker RPC methods or Durable Object namespaces using wrangler types and configuration files.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-runtime-apis-rpc-typescript-workflow-guide.md | Documentation explaining how to use wrangler types to generate Service and DurableObjectNamespace types for Cloudflare Workers RPC. | Questions about documentation explaining how to use wrangler types to generate Service and DurableObjectNamespace types for Cloudflar... |
examples/workers-runtime-apis-rpc-typescript-cloudflare-workers-rpc-typescript-wr.text | A CLI command using npx wrangler types to generate TypeScript definitions for Cloudflare Workers RPC across multiple configuration files. | Exact payloads, commands, or snippets shown in A CLI command using npx wrangler types to generate TypeScript definitions for Cloudflare Workers RPC across multiple... |
examples/workers-runtime-apis-rpc-typescript-cloudflare-workers-wrangler-types-co.text | A command line instruction using wrangler to generate TypeScript types for multiple worker configurations. | Exact payloads, commands, or snippets shown in A command line instruction using wrangler to generate TypeScript types for multiple worker configurations. |
examples/workers-runtime-apis-rpc-typescript-cloudflare-workers-rpc-typescript-wr-2.text | A command line instruction using pnpm wrangler types to generate TypeScript definitions for Cloudflare Workers RPC across multiple configuration files. | Exact payloads, commands, or snippets shown in A command line instruction using pnpm wrangler types to generate TypeScript definitions for Cloudflare Workers RPC ac... |
examples/workers-runtime-apis-rpc-typescript-cloudflare-workers-rpc-typescript-en.text | A TypeScript interface definition for the Workers Env object demonstrating RPC service and Durable Object namespace types. | Exact payloads, commands, or snippets shown in A TypeScript interface definition for the Workers Env object demonstrating RPC service and Durable Object namespace t... |
examples/workers-runtime-apis-rpc-typescript-cloudflare-workers-rpc-typescript-ex.text | A TypeScript example demonstrating how to use the Workers RPC API within an exported handler to call a service method. | Exact payloads, commands, or snippets shown in A TypeScript example demonstrating how to use the Workers RPC API within an exported handler to call a service method. |
What This Skill Covers
- Running wrangler types generates runtime types including the Service and DurableObjectNamespace types, each of which accepts a single type parameter for the...
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/runtime-apis/rpc/typescript
