Skip to content

Commit

Permalink
Clarify workers-types README
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa authored Jan 19, 2023
1 parent e4d5b5d commit a327b3e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions npm/workers-types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,37 @@ The Cloudflare Workers runtime manages backwards compatibility through the use o

- `@cloudflare/workers-types`

The default entrypoint exposes the runtime types for a compatibility date of `2021-01-01` or before.
The default entrypoint exposes the runtime types for a compatibility date before `2021-11-03`.

- `@cloudflare/workers-types/2021-11-03`

This entrypoint exposes the runtime types for a compatibility date between `2021-01-01` and `2021-11-03`.
This entrypoint exposes the runtime types for a compatibility date between `2021-11-03` and `2022-01-31`.

- `@cloudflare/workers-types/2022-01-31`

This entrypoint exposes the runtime types for a compatibility date between `2021-11-03` and `2022-01-31`.
This entrypoint exposes the runtime types for a compatibility date between `2022-01-31` and `2022-03-21`.

- `@cloudflare/workers-types/2022-03-21`

This entrypoint exposes the runtime types for a compatibility date between `2022-01-31` and `2022-03-21`.
This entrypoint exposes the runtime types for a compatibility date between `2022-03-21` and `2022-08-04`.

- `@cloudflare/workers-types/2022-08-04`

This entrypoint exposes the runtime types for a compatibility date between `2022-03-21` and `2022-08-04`.
This entrypoint exposes the runtime types for a compatibility date after `2022-08-04`.

- `@cloudflare/workers-types/experimental`

This entrypoint exposes the runtime types for the latest compatibility date. The types exposed by this entrypoint will change over time to always reflect the latest version of the Workers runtime.

To use one of these entrypoints, you need to specify them in your `tsconfig.json`. For example, this is a sample `tsconfig.json` for using the `experimental` entrypoint.
To use one of these entrypoints, you need to specify them in your `tsconfig.json`. For example, this is a sample `tsconfig.json` for using the `2022-08-04` entrypoint.

```json
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"lib": ["esnext"],
"types": ["@cloudflare/workers-types/experimental"]
"types": ["@cloudflare/workers-types/2022-08-04"]
}
}
```
Expand Down

0 comments on commit a327b3e

Please sign in to comment.