mdash
mdash
Explore posts from servers
CDCloudflare Developers
Created by mdash on 5/20/2024 in #workers-help
service bindings typescript
https://developers.cloudflare.com/workers/runtime-apis/rpc/typescript/ suggests to define your own Env interface which would be incompatible with auto-generated worker-configuration.d.ts. Do I have to sacrifice npx wrangler types and define it manually if I use service bindings? It generates generic Fetcher type:
// Generated by Wrangler on ...
// by running `wrangler types`

interface Env {
SUM_SERVICE: Fetcher;
}
// Generated by Wrangler on ...
// by running `wrangler types`

interface Env {
SUM_SERVICE: Fetcher;
}
1 replies