-
Notifications
You must be signed in to change notification settings - Fork 71
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
Declarations not generated for type-only files not explicitly specified in tsconfig
#211
Comments
That's supposed to work after #175, mostly anyway. Could you run it with verbosity 4 and see if it correctly finds files to import and correctly ignores files from tsconfig that are not imported by anything. You should see what imports what when and things like |
Sure, here's the output:
|
I've also pushed my test case project here: |
Yep, I see it... The file shows up in We need to somehow include such files in |
To get around this for now, I've been running |
@wegry I've also been thinking about letting declarations to be generated in a separate process. |
The above comment worked for me too! I've been having troubles running this command - |
tsconfig
I wrote up a root cause analysis and solution proposal for this in #298 (comment).
Per the proposed solution, I don't think we need to parse declaration files, but we do need to parse the import chain in rpt2 itself (as we can't rely on Rollup to find imports of type-only files), as mentioned in #280 (comment) |
tsconfig
tsconfig
tsconfig
tsconfig
tsconfig
tsconfig
Hello, again!
I've noticed the following behavior: TypeScript declarations are not generated for source modules from which only types are imported and which are not explicitly added to the project using
files
orinclude
options intsconfig.json
.Project configuration
Source files
Generated files
dist/types/unused.d.ts
is not generated, which is GOOD.dist/types/foo.d.ts
is not generated, which is BAD.And if I would set
"include": ["src/"]
, thedist/types/unused.d.ts
would be generated, however, it shouldn't, because it's not imported anywhere.Our goal here is to specify only the entry point of our project and let the compiler to handle only source files that are actually used in the project and avoid processing, generating declarations and reporting errors for files that are not used (redundant).
The text was updated successfully, but these errors were encountered: