Skip to content

Commit 8973788

Browse files
committed
temp
1 parent 3e38f07 commit 8973788

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

src/content/docs/workers/languages/typescript/index.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { TabItem, Tabs } from "~/components";
1414

1515
TypeScript is a first-class language on Cloudflare Workers. Cloudflare publishes type definitions to [GitHub](https://github.com/cloudflare/workers-types) and [npm](https://www.npmjs.com/package/@cloudflare/workers-types) (`npm install -D @cloudflare/workers-types`). All APIs provided in Workers are fully typed, and type definitions are generated directly from [workerd](https://github.com/cloudflare/workerd), the open-source Workers runtime.
1616

17-
### Generate types that match your Worker's configuration (experimental)
17+
<h3 id="type-gen">Generate types that match your Worker's configuration</h3>
1818

1919
Cloudflare continuously improves [workerd](https://github.com/cloudflare/workerd), the open-source Workers runtime.
2020
Changes in workerd can introduce JavaScript API changes, thus changing the respective TypeScript types. For example, the [`urlsearchparams_delete_has_value_arg`](/workers/configuration/compatibility-flags/#urlsearchparams-delete-and-has-value-argument) compatibility flag adds optional arguments to some methods, in order to support new additions to the WHATWG URL standard API.
@@ -44,7 +44,9 @@ npx wrangler types --experimental-include-runtime="./runtime.d.ts"
4444

4545
See [the full list of available flags](/workers/wrangler/commands/#types) for more details.
4646

47-
#### Migrating from `@cloudflare/workers-types` to `wrangler types --experimental-include-runtime`
47+
<h4 id="migrating">
48+
Migrating from `@cloudflare/workers-types` to `wrangler types`
49+
</h4>
4850

4951
The `@cloudflare/workers-types` package provides runtime types for each distinct [compatibility date](https://github.com/cloudflare/workerd/tree/main/npm/workers-types#compatibility-dates), which is specified by the user in their `tsconfig.json`. But this package is superseded by the `wrangler types --experimental-include-runtime` command.
5052

@@ -162,3 +164,4 @@ For more information, refer to [this GitHub issue](https://github.com/cloudflare
162164
- [@cloudflare/workers-types](https://github.com/cloudflare/workers-types)
163165
- [Runtime APIs](/workers/runtime-apis/)
164166
- [TypeScript Examples](/workers/examples/?languages=TypeScript)
167+
- [test link](/workers/languages/typescript/#type-short)

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ head:
77
description: Create, develop, and deploy your Cloudflare Workers with Wrangler commands.
88
---
99

10-
import { TabItem, Tabs, Render, Type, MetaInfo, WranglerConfig } from "~/components";
10+
import {
11+
TabItem,
12+
Tabs,
13+
Render,
14+
Type,
15+
MetaInfo,
16+
WranglerConfig,
17+
} from "~/components";
1118

1219
Wrangler offers a number of commands to manage your Cloudflare Workers.
1320

@@ -1860,6 +1867,7 @@ wrangler cert upload certificate-authority --ca-cert <PATH> [OPTIONS]
18601867
```
18611868

18621869
- `--ca-cert` <Type text="string" /> <MetaInfo text="required" />
1870+
18631871
- A path to the Certificate Authority (CA) chain certificate to upload.
18641872

18651873
- `--name` <Type text="string" /> <MetaInfo text="optional" />
@@ -1943,7 +1951,7 @@ Deleted certificate 99f5fef1-6cc1-46b8-bd79-44a0d5082b8d successfully
19431951

19441952
## `types`
19451953

1946-
Generate types from bindings and module rules in configuration.
1954+
Generate types based on your Worker configuration.
19471955

19481956
```txt
19491957
wrangler types [<PATH>] [OPTIONS]

0 commit comments

Comments
 (0)