cloudflare · Cloudflare Workers Docs
Workers TypeScript
Teaches how to configure TypeScript for Cloudflare Workers by generating runtime types that match specific worker configurations, compatibility dates, and bindings using the wrangler types command.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers TypeScript
Teaches how to configure TypeScript for Cloudflare Workers by generating runtime types that match specific worker configurations, compatibility dates, and bindings using the wrangler types command.
When To Use
Use when you need to generate TypeScript definitions that accurately reflect your Worker's specific bindings, compatibility flags, and runtime environment.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-typescript-index-workflow-guide.md | A guide explaining how to use TypeScript with Cloudflare Workers, including migrating to wrangler-generated types. | Questions about a guide explaining how to use TypeScript with Cloudflare Workers, including migrating to wrangler-generated types. |
examples/workers-typescript-index-cloudflare-workers-typescript-wrangler-types-co.text | A text representation of the npx wrangler types command used to generate TypeScript definitions for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A text representation of the npx wrangler types command used to generate TypeScript definitions for Cloudflare Workers. |
examples/workers-typescript-index-cloudflare-workers-typescript-wrangler-types-co-2.text | A text representation of the wrangler types command used to generate TypeScript definitions for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A text representation of the wrangler types command used to generate TypeScript definitions for Cloudflare Workers. |
examples/workers-typescript-index-cloudflare-workers-typescript-wrangler-types-co-3.text | A command-line instruction demonstrating how to use pnpm wrangler types to generate TypeScript definitions for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A command-line instruction demonstrating how to use pnpm wrangler types to generate TypeScript definitions for Cloudf... |
examples/workers-typescript-index-cloudflare-workers-typescript-npm-uninstall-com.text | The npm command to uninstall the @cloudflare/workers-types package from a project. | Exact payloads, commands, or snippets shown in The npm command to uninstall the @cloudflare/workers-types package from a project. |
examples/workers-typescript-index-cloudflare-workers-typescript-types-removal-com.text | A command to remove the @cloudflare/workers-types package using yarn. | Exact payloads, commands, or snippets shown in A command to remove the @cloudflare/workers-types package using yarn. |
examples/workers-typescript-index-cloudflare-workers-typescript-remove-types-comm.text | A command to remove the @cloudflare/workers-types package using pnpm. | Exact payloads, commands, or snippets shown in A command to remove the @cloudflare/workers-types package using pnpm. |
examples/workers-typescript-index-cloudflare-workers-typescript-bun-remove-types-.text | A command to remove the @cloudflare/workers-types package using the Bun package manager. | Exact payloads, commands, or snippets shown in A command to remove the @cloudflare/workers-types package using the Bun package manager. |
examples/workers-typescript-index-cloudflare-workers-typescript-tsconfig-configur.text | A tsconfig.json configuration file demonstrating the compilerOptions required for a Cloudflare Workers TypeScript project. | Exact payloads, commands, or snippets shown in A tsconfig.json configuration file demonstrating the compilerOptions required for a Cloudflare Workers TypeScript pro... |
examples/workers-typescript-index-cloudflare-workers-typescript-npm-node-types-in.text | The command to install node type definitions for Cloudflare Workers using npm. | Exact payloads, commands, or snippets shown in The command to install node type definitions for Cloudflare Workers using npm. |
examples/workers-typescript-index-cloudflare-workers-typescript-node-types-instal.text | A command to install Node.js type definitions for Cloudflare Workers using yarn. | Exact payloads, commands, or snippets shown in A command to install Node.js type definitions for Cloudflare Workers using yarn. |
examples/workers-typescript-index-cloudflare-workers-typescript-node-types-instal-2.text | A command to install Node.js type definitions for Cloudflare Workers using pnpm. | Exact payloads, commands, or snippets shown in A command to install Node.js type definitions for Cloudflare Workers using pnpm. |
examples/workers-typescript-index-cloudflare-workers-typescript-node-types-instal-3.text | A command to install Node.js type definitions using the Bun package manager for Cloudflare Workers TypeScript development. | Exact payloads, commands, or snippets shown in A command to install Node.js type definitions using the Bun package manager for Cloudflare Workers TypeScript develop... |
examples/workers-typescript-index-cloudflare-workers-typescript-tsconfig-configur-2.text | A TypeScript configuration file demonstrating the compilerOptions and type definitions required for a Cloudflare Workers environment. | Exact payloads, commands, or snippets shown in A TypeScript configuration file demonstrating the compilerOptions and type definitions required for a Cloudflare Work... |
examples/workers-typescript-index-cloudflare-workers-typescript-package-json-scri.text | A package.json configuration snippet showing scripts for development, building, type generation, and type checking in a Cloudflare Workers TypeScript project. | Exact payloads, commands, or snippets shown in A package.json configuration snippet showing scripts for development, building, type generation, and type checking in... |
examples/workers-typescript-index-cloudflare-workers-typescript-build-test-comman.text | A list of npm commands used to generate types, build, and test a Cloudflare Workers TypeScript project. | Exact payloads, commands, or snippets shown in A list of npm commands used to generate types, build, and test a Cloudflare Workers TypeScript project. |
examples/workers-typescript-index-cloudflare-workers-typescript-build-test-comman-2.text | A list of shell commands for generating types, building, and testing a Cloudflare Workers TypeScript project. | Exact payloads, commands, or snippets shown in A list of shell commands for generating types, building, and testing a Cloudflare Workers TypeScript project. |
examples/workers-typescript-index-cloudflare-workers-typescript-build-test-comman-3.text | A list of shell commands for generating types, building, and testing a Cloudflare Workers TypeScript project. | Exact payloads, commands, or snippets shown in A list of shell commands for generating types, building, and testing a Cloudflare Workers TypeScript project. |
examples/workers-typescript-index-cloudflare-workers-typescript-type-checking-com.text | A list of terminal commands for running type checking, building, and testing in a Cloudflare Workers TypeScript project. | Exact payloads, commands, or snippets shown in A list of terminal commands for running type checking, building, and testing in a Cloudflare Workers TypeScript project. |
examples/workers-typescript-index-cloudflare-workers-typescript-type-checking-com-2.text | A list of yarn commands used to check types, build, and test Cloudflare Workers using TypeScript. | Exact payloads, commands, or snippets shown in A list of yarn commands used to check types, build, and test Cloudflare Workers using TypeScript. |
examples/workers-typescript-index-cloudflare-workers-typescript-type-checking-com-3.text | A list of pnpm commands used to check types and build Cloudflare Workers projects using TypeScript. | Exact payloads, commands, or snippets shown in A list of pnpm commands used to check types and build Cloudflare Workers projects using TypeScript. |
What This Skill Covers
- TypeScript is a first-class language on Cloudflare Workers. All APIs provided in Workers are fully typed, and type definitions are generated directly from wo...
- Main sections:
Generate types that match your Worker's configuration,Migrating from @cloudflare/workers-types to wrangler types,1\. Uninstall @cloudflare/workers-types,2\. Generate runtime types using Wrangler,3\. Make sure your tsconfig.json includes the generated types.
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/languages/typescript/index.md
