Skip to content

Commit 87b87df

Browse files
authored
remove incorrect workaround (#23527)
1 parent 0b1d534 commit 87b87df

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/content/docs/workers/runtime-apis/rpc/typescript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ For example, if your client Worker had bindings to a Worker in `../sum-worker/`
2929
/>
3030

3131
:::note
32-
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.
32+
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.
3333
:::
3434

3535
This will produce a `worker-configuration.d.ts` file that includes:

src/content/docs/workers/wrangler/commands.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1989,7 +1989,9 @@ wrangler types [<PATH>] [OPTIONS]
19891989
SERVICE_BINDING: Service<import("../bound-worker/src/index").Entrypoint>;
19901990
}
19911991
```
1992-
- 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.
1992+
:::note
1993+
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.
1994+
:::
19931995

19941996
---
19951997

0 commit comments

Comments
 (0)