cloudflare / cloudflare/workerd

Update `workers-types` `README` to make it clear only types can be imported

Open
#292 8 comments 1 reaction 0 assignees View on GitHub
types
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

I'd like to directly import required types, and not utilize the `types` field in `tsconfig.json`.

During development it all seems to work fine, but whenever I run `wrangler dev` I get errors like this:
`No matching export in "node_modules/@cloudflare/workers-types/2022-08-04/index.ts" for import "Response"`.

What's the correct way to import?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.