Skip to content

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

Open
@Darker

Description

@Darker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions