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

Declarations not emitted for included type-only files #175

Closed
cslecours opened this issue Sep 26, 2019 · 1 comment · Fixed by #176
Closed

Declarations not emitted for included type-only files #175

cslecours opened this issue Sep 26, 2019 · 1 comment · Fixed by #176
Labels
kind: regression Specific type of bug -- past behavior that worked is now broken topic: type-only / emit-less imports Related to importing type-only files that will not be emitted

Comments

@cslecours
Copy link
Contributor

cslecours commented Sep 26, 2019

What happens and why it is wrong

repro repository : https://github.com/cslecours/repro-ts-rollup-issue

In the output, I am missing types that were exported. In dist I see the types/index.d.ts but not types/abc.d.ts that it depends on. It seems to be related to the allImportedFiles Set that was added by 0.23 as I see that my files are skipped.

I did attempt at a fix, but it will probably break other things.
https://github.com/cslecours/rollup-plugin-typescript2

Environment

Versions

  • typescript: 3.1.6
  • rollup: 1.21.2
  • rollup-plugin-typescript2: 0.24.2

rollup.config.js

https://github.com/cslecours/repro-ts-rollup-issue/blob/master/rollup.config.js

tsconfig.json

package.json

plugin output with verbosity 3

https://github.com/cslecours/repro-ts-rollup-issue/blob/master/output_logs/npm-run-build.txt

@ezolenko
Copy link
Owner

Looks related to #172

Your fix looks correct actually, create a PR :)

@agilgur5 agilgur5 added kind: regression Specific type of bug -- past behavior that worked is now broken kind: bug Something isn't working properly topic: type-only / emit-less imports Related to importing type-only files that will not be emitted and removed kind: regression Specific type of bug -- past behavior that worked is now broken kind: bug Something isn't working properly labels May 8, 2022
Repository owner locked as resolved and limited conversation to collaborators Jun 4, 2022
@agilgur5 agilgur5 changed the title Exported types not present in generated output Declarations not emitted for included type-only files Jun 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind: regression Specific type of bug -- past behavior that worked is now broken topic: type-only / emit-less imports Related to importing type-only files that will not be emitted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants