Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
resolve: Fix detection of declaration files
  • Loading branch information
neurolag committed Sep 17, 2022
commit 8762de47befab52c0c614e180c02aa9ad373a3e4
2 changes: 1 addition & 1 deletion src/instances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ export function getInputFileNameFromOutput(
instance: TSInstance,
filePath: string
): string | undefined {
if (filePath.match(tsTsxRegex) && !fileExtensionIs(filePath, '.d.ts')) {
if (filePath.match(tsTsxRegex) && !/\.d\.([cm]?ts|tsx)$/.test(filePath)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we give this regex a name and site it in constants.ts?

return undefined;
}
if (instance.solutionBuilderHost) {
Expand Down