Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/docs/workers/runtime-apis/rpc/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For example, if your client Worker had bindings to a Worker in `../sum-worker/`
/>

:::note
If your service binding targets a `WorkerEntrypoint` that is a default export, make sure you set `entrypoint: "default"` in your Wrangler config when you configure your service binding.
Currently, this only works if your service binding targets a [named entrypoint](/workers/runtime-apis/bindings/service-bindings/rpc/#named-entrypoints), rather than the default export. If you are unable to use named entrypoints, we recommend you extend your `Env` type in a separate file in order to manually provide those types without risk of being overwritten by subsequent runs of `wrangler types`. This is a temporary limitation we are working to fix.
:::

This will produce a `worker-configuration.d.ts` file that includes:
Expand Down
4 changes: 3 additions & 1 deletion src/content/docs/workers/wrangler/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,9 @@ wrangler types [<PATH>] [OPTIONS]
SERVICE_BINDING: Service<import("../bound-worker/src/index").Entrypoint>;
}
```
- If your service binding targets a [`WorkerEntrypoint`](/workers/runtime-apis/bindings/service-bindings/rpc/) that is a default export, make sure you set `entrypoint: "default"` in your Wrangler config when you configure your service binding.
:::note
Currently, this only works if your service binding targets a [named entrypoint](/workers/runtime-apis/bindings/service-bindings/rpc/#named-entrypoints), rather than the default export. If you are unable to use named entrypoints, we recommend you extend your `Env` type in a separate file in order to manually provide those types without risk of being overwritten by subsequent runs of `wrangler types`. This is a temporary limitation we are working to fix.
:::

---

Expand Down