/** * Type declarations for Cloudflare virtual modules * * These are only available at runtime on Cloudflare Workers. * The types here are minimal - just enough for our usage. */ declare module "cloudflare:workers" { /** * Environment bindings object * Contains all bindings defined in wrangler.toml (D1, R2, KV, etc.) */ export const env: Record; /** * Exports object for loopback bindings */ export const exports: Record; /** * Base class for Worker Entrypoints */ export class WorkerEntrypoint { env: TEnv; ctx: ExecutionContext & { props: TProps }; } } declare module "cloudflare:email" { // Email worker types if needed }