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

Allow generating IDE-only .d.ts type hints by omitting all export statements #650

Open
Darker opened this issue Feb 1, 2025 · 0 comments

Comments

@Darker
Copy link

Darker commented Feb 1, 2025

Currently, when a .d.ts file is generated, it exports it's symbols. That's good for typescript usage, but when working in plain JavaScript, it is often more convenient to omit those in .d.ts files, which causes VS Code (and I am assuming other IDEs) to implicitly import these for the purposes of type checking only.

Since without transpiling, browsers and Node typically do not accept TypeScript, this makes this tool unusable for hinting in plain JS projects that do not use some kind of transpiler, such as webpack.

I would like to propose a simple additional parameter, such as --noExports that would generate .d.ts files purely for type hinting purposes.

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

1 participant