json-schema-to-typescript
json-schema-to-typescript copied to clipboard
Allow generating IDE-only .d.ts type hints by omitting all export statements
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.