Closed tuomokar closed 6 months ago
A note for myself (or anyone who's concerned) about the issue: currently the tool uses only root file exports to detect whether a type/value is used or not and thus whether it should be added to the bundle (via either way e.g. importing or inlining). With --inline-declare-externals
we need to consider all these "declare externals" as well (it might be tricky tho as collecting a list of such externals is done at the same time as processing all files, so we might need to split this into 2 phases).
The fix has been published in 9.4.0 version.
Bug report
When using the parameter
--inline-declare-externals
, the produceddeclare module
statement can miss some imports if the statement includes types that extend another type.Input code
Expected output
Actual output
Additional context
When building, these errors appear:
I made a small repository to reproduce the issue. It can be found from here.
Thank you for your time in advance!