Open kosciolek opened 1 week ago
I can contribute a bugfix, if someone confirms this really is a bug and not intended
It should go to:
export { } from "./b";
Someone may go to add a named export after removing the last one.
@dsherret I believe there should be 2 methods then, since this behavior is easy to miss
remove
and removeAndRemoveDeclarationIfEmpty
, or removeWithDeclaration
WDYT?
There's already an exportDeclaration.remove()
. I don't think we need so many methods.
Describe the bug
Version: 23.0.0
Calling
namedExport.remove()
on the last named export in a declaration inserts anexport * from 'module';
, instead of removing the declaration.To Reproduce
Input:
Output:
Expected behavior
An empty file (the export declaration should be simply removed).