mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
extract no extension but non ts extensions allowed into its own clause. make boolean expression more natural to read
This commit is contained in:
parent
23dde17194
commit
b399ce8c8d
@ -5231,7 +5231,10 @@ module ts {
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!((options.allowNonTsExtensions && findSourceFile(filename, isDefaultLib, refFile, refPos, refEnd)) || 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…
x
Reference in New Issue
Block a user