You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trimming certain members during rollup (e.g. removing interfaces/classes), related import statements at the top of the rollup file are not trimmed, when they are no longer needed.
Repro steps
I have two libraries library-a and library-b.
They have some internal members (decorated with @internal comment), which I want to remove in a public distributable version. Library-b is extending some internal members of library-a.
The public trimmed rollup of library-b however remains with some import statements to internals of library-a.
Since they are no longer exported, this results in "Module library-a has no exported member xxxx" when consuming both public versions of these libraries.
Possible solution
It would help if api-extractor would remove any unused import statements when all processing is done.
Summary
When trimming certain members during rollup (e.g. removing interfaces/classes), related import statements at the top of the rollup file are not trimmed, when they are no longer needed.
Repro steps
I have two libraries library-a and library-b.
They have some internal members (decorated with @internal comment), which I want to remove in a public distributable version. Library-b is extending some internal members of library-a.
The public trimmed rollup of library-b however remains with some import statements to internals of library-a.
Since they are no longer exported, this results in "Module library-a has no exported member xxxx" when consuming both public versions of these libraries.
Possible solution
It would help if api-extractor would remove any unused import statements when all processing is done.
Example
library-a.d.ts (untrimmed):
library-b.d.ts (untrimmed):
library-b.public.d.ts (trimmed):
Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/api-extractor
version?node -v
)?The text was updated successfully, but these errors were encountered: