mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
fix #1593 - also honour allowNonTsExtensions flag when there is no extension
This commit is contained in:
parent
ae0caed8f7
commit
23dde17194
@ -5231,7 +5231,7 @@ module ts {
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!(findSourceFile(filename + ".ts", isDefaultLib, refFile, refPos, refEnd) || findSourceFile(filename + ".d.ts", isDefaultLib, refFile, refPos, refEnd))) {
|
||||
if (!((options.allowNonTsExtensions && findSourceFile(filename, isDefaultLib, refFile, refPos, refEnd)) || findSourceFile(filename + ".ts", isDefaultLib, refFile, refPos, refEnd) || findSourceFile(filename + ".d.ts", isDefaultLib, refFile, refPos, refEnd))) {
|
||||
diagnostic = Diagnostics.File_0_not_found;
|
||||
filename += ".ts";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user