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

Bundle @types/node #27046

Open
lishaduck opened this issue Nov 25, 2024 · 2 comments
Open

Bundle @types/node #27046

lishaduck opened this issue Nov 25, 2024 · 2 comments

Comments

@lishaduck
Copy link

lishaduck commented Nov 25, 2024

Deno has a Node compatibility layer. I'm currently using it for a few operations in @lishaduck/effect-platform-deno that rely on fids. However, the node:* modules don't come with types. The docs recommend installing @types/node, but this both augments the globals (e.g., it shows Buffer as available) and isn't kept in sync with Deno's TS and Node support. For example, until #26950 is completed, the latest @types/node doesn't work with Deno, and it'd also be nice to get deprecation warnings on things that the Node-compat layer doesn't support.

@VienDinhCom
Copy link

Maybe we should wait for Node to support TypeScript, so we can have more stable typing.

https://nodejs.org/en/learn/typescript/run-natively

@lishaduck
Copy link
Author

Maybe we should wait for Node to support TypeScript, so we can have more stable typing.

I haven't seen anything about Node taking over maintenance of @types/node as part of the ts work.
That'd be great, but I don't foresee it happening anytime soon—I believe Node uses a custom JSDoc-like comment-based dsl for documenting types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants