Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update workers-types package README [do not merge] #3570

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
9 changes: 8 additions & 1 deletion npm/workers-types/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Cloudflare Workers Types

> **Note**
>
> We now recommend using the [Wrangler CLI](https://www.npmjs.com/package/wrangler) and the `wrangler types` command to generate types based on your compatibility date _and_ compatibility flags. You can learn more about this, and how to migrate from @cloudflare/workers-types [here in our docs](https://developers.cloudflare.com/workers/languages/typescript/#generate-types).
>
> @cloudflare/workers-types will continue to be published on the same schedule.


## Install

```bash
Expand Down Expand Up @@ -27,7 +34,7 @@ The following is a minimal `tsconfig.json` for use alongside this package:

### Compatibility dates

![Entrypoints for compatibility dates](./entrypoints.svg)
![Entrypoints for compatibility dates](./npm/workers-types/entrypoints.svg)

The Cloudflare Workers runtime manages backwards compatibility through the use of [Compatibility Dates](https://developers.cloudflare.com/workers/platform/compatibility-dates/). Using different compatibility dates affects the runtime types available to your Worker, and so it's important you specify the correct entrypoint to the `workers-types` package to match your compatibility date (which is usually set in your `wrangler.toml` configuration file). `workers-types` currently exposes the following entrypoints to choose from:

Expand Down