Cloudflare DevelopersCD
Cloudflare Developersβ€’9mo agoβ€’
6 replies
Sam

Wrangler types using "fetcher" type for RPC binding rather than Service

I have a binding in my wrangler.toml
services = [
    { binding = "TRACE_EXPORTER_SERVICE", service = "observability-service", entrypoint = "TraceExportService" },
]

However when using wrangler types command to generate types I get
TRACE_EXPORTER_SERVICE: Fetcher;

But I believe it should be
TRACE_EXPORTER_SERVICE: Service<TraceExporterService>;

Am I wrong here or missing something, or is this not supported yet with wrangler types?
https://developers.cloudflare.com/workers/runtime-apis/rpc/typescript/
Cloudflare Docs
How TypeScript types for your Worker or Durable Object's RPC methods are generated and exposed to clients
TypeScript
Was this page helpful?