File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ export function nodeVisitor(this: VisitorContext, node: ts.Node): ts.Node | unde
109
109
return resolvePathAndUpdateNode ( this , node , node . moduleSpecifier . text , ( p ) => {
110
110
let importClause = node . importClause ;
111
111
112
- if ( ! this . isDeclarationFile && importClause ) {
112
+ if ( ! this . isDeclarationFile && importClause ?. namedBindings ) {
113
113
const updatedImportClause = elideImportOrExportClause ( this , node ) ;
114
114
if ( ! updatedImportClause ) return undefined ; // No imports left, elide entire declaration
115
115
importClause = updatedImportClause ;
@@ -127,7 +127,7 @@ export function nodeVisitor(this: VisitorContext, node: ts.Node): ts.Node | unde
127
127
return resolvePathAndUpdateNode ( this , node , node . moduleSpecifier . text , ( p ) => {
128
128
let exportClause = node . exportClause ;
129
129
130
- if ( ! this . isDeclarationFile && exportClause ) {
130
+ if ( ! this . isDeclarationFile && exportClause && tsInstance . isNamedExports ( exportClause ) ) {
131
131
const updatedExportClause = elideImportOrExportClause ( this , node ) ;
132
132
if ( ! updatedExportClause ) return undefined ; // No export left, elide entire declaration
133
133
exportClause = updatedExportClause ;
You can’t perform that action at this time.
0 commit comments