Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers TypeScript

Configures TypeScript for Cloudflare Workers by generating runtime types that match specific worker configurations, including compatibility dates, flags, and bindings.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers TypeScript

Configures TypeScript for Cloudflare Workers by generating runtime types that match specific worker configurations, including compatibility dates, flags, and bindings.

When To Use

Use when you need to synchronize TypeScript definitions with your Worker's specific compatibility flags, bindings, and runtime configuration using Wrangler.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-typescript-workflow-guide.mdA guide on generating runtime types from workerd and migrating from @cloudflare/workers-types to wrangler types for Cloudflare Workers.Questions about a guide on generating runtime types from workerd and migrating from @cloudflare/workers-types to wrangler types for C...
examples/workers-typescript-cloudflare-workers-typescript-wrangler-types-command.textA 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-cloudflare-workers-typescript-wrangler-types-command-2.textA text snippet demonstrating the wrangler types command used to generate TypeScript definitions for Cloudflare Workers.Exact payloads, commands, or snippets shown in A text snippet demonstrating the wrangler types command used to generate TypeScript definitions for Cloudflare Workers.
examples/workers-typescript-cloudflare-workers-typescript-wrangler-types-command-3.textA text snippet demonstrating the pnpm wrangler types command used to generate TypeScript definitions for Cloudflare Workers.Exact payloads, commands, or snippets shown in A text snippet demonstrating the pnpm wrangler types command used to generate TypeScript definitions for Cloudflare W...
examples/workers-typescript-cloudflare-workers-typescript-npm-uninstall-command.textA text snippet showing the command to uninstall the @cloudflare/workers-types package from a project.Exact payloads, commands, or snippets shown in A text snippet showing the command to uninstall the @cloudflare/workers-types package from a project.
examples/workers-typescript-cloudflare-workers-typescript-type-removal-command.textA 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-cloudflare-workers-typescript-package-dependency-remo.textA command demonstrating how to remove the @cloudflare/workers-types package using pnpm.Exact payloads, commands, or snippets shown in A command demonstrating how to remove the @cloudflare/workers-types package using pnpm.
examples/workers-typescript-cloudflare-workers-typescript-bun-types-removal.textA 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-cloudflare-workers-typescript-tsconfig-configuration.textA tsconfig.json configuration file demonstrating the compilerOptions required for developing Cloudflare Workers with TypeScript.Exact payloads, commands, or snippets shown in A tsconfig.json configuration file demonstrating the compilerOptions required for developing Cloudflare Workers with...
examples/workers-typescript-cloudflare-workers-typescript-npm-node-types-installa.textThe command to install Node.js type definitions for Cloudflare Workers using npm.Exact payloads, commands, or snippets shown in The command to install Node.js type definitions for Cloudflare Workers using npm.
examples/workers-typescript-cloudflare-workers-typescript-node-types-installation.textA 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-cloudflare-workers-typescript-node-types-installation-2.textA 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-cloudflare-workers-typescript-node-types-installation-3.textA 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-cloudflare-workers-typescript-tsconfig-configuration-2.textA 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-cloudflare-workers-typescript-package-json-scripts.textA 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-cloudflare-workers-typescript-setup-commands.textA list of npm commands used to generate types, build, and test a Cloudflare Workers project using TypeScript.Exact payloads, commands, or snippets shown in A list of npm commands used to generate types, build, and test a Cloudflare Workers project using TypeScript.
examples/workers-typescript-cloudflare-workers-typescript-setup-commands-2.textA 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-cloudflare-workers-typescript-build-test-commands.textA 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-cloudflare-workers-typescript-type-checking-commands.textA list of terminal commands for running type checks, building, and testing Cloudflare Workers using TypeScript.Exact payloads, commands, or snippets shown in A list of terminal commands for running type checks, building, and testing Cloudflare Workers using TypeScript.
examples/workers-typescript-cloudflare-workers-typescript-type-check-commands.textA list of yarn wrangler commands used to check types, build, and test a Cloudflare Workers TypeScript project.Exact payloads, commands, or snippets shown in A list of yarn wrangler commands used to check types, build, and test a Cloudflare Workers TypeScript project.
examples/workers-typescript-cloudflare-workers-typescript-type-checking-commands-2.textA 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

  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/languages/typescript