cloudflare / cloudflare/workerd
Extracting Ambient Module Types
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
In projects where it is not feasible to add the worker types to tsconfig, but rather, import them, it works beautifully. Except there is no way to import the ambient module declarations, such as `cloudflare:email`, `cloudflare:sockets`, `cloudflare:workers`, `cloudflare:test`, etc.
It would be nice if these types were moved into a separate file so that ambient modules can be included in tsconfig without bringing in all of the other types. I'd like to import the others, but define the ambient modules globally in tsconfig, since the ambient modules are prefixed as `cloudflare:`, so they really do not come with any potential conflicts.
Contributor guide
Assessment
This issue has not been assessed yet.