cloudflare / cloudflare/workerd

Missing type annotations for AsyncLocalStorage?

Open
#748 2 comments 3 reactions 1 assignee Claimed by @workers-devprod View on GitHub
types
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

VSCode (& presumably tsc) complains with:
```
Cannot find module 'node:async_hooks' or its corresponding type declarations.ts(2307)
```
I have the compatibility flag set in wrangler.

I don't see any mention of `AsyncLocalStorage` in `node_modules/@cloudflare/workers-types`. Is the expectation that I just add `@types/node` to my tsconfig.json? If so, that could use some documentation on https://developers.cloudflare.com/workers/platform/nodejs-compatibility/ or somewhere in the docs.

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.