Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-runtime-apis-rpc-typescript-workflow-guide.mdDocumentation 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.textA 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.textA 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.textA 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.textA 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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