2.3 KiB
2.3 KiB
Bindings API Reference
Fetch the relevant documentation before choosing method signatures, binding types, or type-generation settings.
| Task | Current documentation |
|---|---|
Access bindings in handlers, entrypoint classes, or imported env |
Bindings and environment access |
Generate environment and runtime types; configure TypeScript or migrate from @cloudflare/workers-types |
Workers TypeScript |
| Use framework-specific environment access | Hono on Workers (follow the framework's linked documentation) |
| Read, write, delete, and list KV keys | KV Workers API |
| Read, write, delete, and list R2 objects | R2 Workers API |
| Prepare and bind SQL statements or execute batches | D1 Workers Binding API |
| Address Durable Objects and call their methods | Durable Objects API |
| Send queue messages | Queues JavaScript APIs |
| Run model inference | Workers AI bindings |
| Call another Worker using HTTP or typed RPC | Service bindings and RPC TypeScript |
| Find other product binding APIs, including Browser, mTLS, rate limiting, and Workflows | Current binding catalog |
Regenerate types after configuration changes and use the selected environment's configuration. Follow the current TypeScript setup for the project's toolchain instead of hardcoding a generated declaration path or maintaining a handwritten binding interface. Types describe the expected bindings; they do not provision resources or prove the deployed environment is configured correctly.