Skip to content

Commit c9389e4

Browse files
GregBrimbleRebeccaTamachiro
authored andcommitted
Upgrade Wrangler v4+ for 'using' (#20797)
1 parent 39bbf3b commit c9389e4

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,7 @@ function sendEmail(id, message) {
4747

4848
### How to use the `using` declaration in your Worker
4949

50-
Because it has not yet landed in V8, the `using` keyword is not yet available directly in the Workers runtime. To use it in your code, you must use a prerelease version of the [Wrangler CLI](/workers/wrangler/) to run and deploy your Worker:
51-
52-
```sh
53-
npx wrangler@using-keyword-experimental dev
54-
```
55-
56-
This version of Wrangler will transpile `using` into direct calls to `Symbol.dispose()`, before running your code or deploying it to Cloudflare.
50+
[Wrangler](/workers/wrangler/) v4+ supports the `using` keyword natively. If you are on an earlier version of Wrangler, you can alternatively call dispose of resources manually.
5751

5852
The following code:
5953

0 commit comments

Comments
 (0)