Manual port of fixe for #1593 from release-1.4
This commit is contained in:
parent
32d4b4d045
commit
a99b958484
|
@ -185,7 +185,10 @@ 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)) {
|
||||
diagnostic = Diagnostics.File_0_not_found;
|
||||
}
|
||||
else if (!findSourceFile(filename + ".ts", isDefaultLib, refFile, refPos, refEnd) && !findSourceFile(filename + ".d.ts", isDefaultLib, refFile, refPos, refEnd)) {
|
||||
diagnostic = Diagnostics.File_0_not_found;
|
||||
filename += ".ts";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue