File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ const transformer = (_: ts.Program) => (context: ts.TransformationContext) => (
12
12
const compilerOptions = context . getCompilerOptions ( ) ;
13
13
const sourceDir = dirname ( sourceFile . fileName ) ;
14
14
15
+ const { isDeclarationFile } = sourceFile ;
16
+
15
17
const { baseUrl = "" , paths = { } } = compilerOptions ;
16
18
17
19
const binds = Object . keys ( paths )
@@ -39,6 +41,7 @@ const transformer = (_: ts.Program) => (context: ts.TransformationContext) => (
39
41
40
42
function visit ( node : ts . Node ) : ts . VisitResult < ts . Node > {
41
43
if (
44
+ ! isDeclarationFile &&
42
45
resolver &&
43
46
ts . isExportDeclaration ( node ) &&
44
47
! node . exportClause &&
@@ -74,7 +77,7 @@ const transformer = (_: ts.Program) => (context: ts.TransformationContext) => (
74
77
visitImportClause as any ,
75
78
ts . isImportClause
76
79
) ;
77
- return node . importClause === importClause || importClause
80
+ return node . importClause === importClause || importClause || isDeclarationFile
78
81
? ts . updateImportDeclaration (
79
82
node ,
80
83
node . decorators ,
You can’t perform that action at this time.
0 commit comments