Skip to content

Commit 23dde17

Browse files
committed
fix #1593 - also honour allowNonTsExtensions flag when there is no extension
1 parent ae0caed commit 23dde17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5231,7 +5231,7 @@ module ts {
52315231
}
52325232
}
52335233
else {
5234-
if (!(findSourceFile(filename + ".ts", isDefaultLib, refFile, refPos, refEnd) || findSourceFile(filename + ".d.ts", isDefaultLib, refFile, refPos, refEnd))) {
5234+
if (!((options.allowNonTsExtensions && findSourceFile(filename, isDefaultLib, refFile, refPos, refEnd)) || findSourceFile(filename + ".ts", isDefaultLib, refFile, refPos, refEnd) || findSourceFile(filename + ".d.ts", isDefaultLib, refFile, refPos, refEnd))) {
52355235
diagnostic = Diagnostics.File_0_not_found;
52365236
filename += ".ts";
52375237
}

0 commit comments

Comments
 (0)