Skip to content

Commit 746b01e

Browse files
committed
Check only for .d.ts files
1 parent c97be16 commit 746b01e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/compiler/program.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2468,8 +2468,10 @@ namespace ts {
24682468
}
24692469
else {
24702470
forEach(resolvedRef.commandLine.fileNames, fileName => {
2471-
const outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, host.useCaseSensitiveFileNames());
2472-
mapFromToProjectReferenceRedirectSource!.set(toPath(outputDts), fileName);
2471+
if (!fileExtensionIs(fileName, Extension.Dts) && hasTSFileExtension(fileName)) {
2472+
const outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, host.useCaseSensitiveFileNames());
2473+
mapFromToProjectReferenceRedirectSource!.set(toPath(outputDts), fileName);
2474+
}
24732475
});
24742476
}
24752477
}

0 commit comments

Comments
 (0)