mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Fix #1871 by ensuring the at we get the canonical filename before we check the extension
This commit is contained in:
parent
9a6e3ad52d
commit
0ce51e684f
@ -176,7 +176,7 @@ module ts {
|
||||
}
|
||||
var diagnostic: DiagnosticMessage;
|
||||
if (hasExtension(filename)) {
|
||||
if (!options.allowNonTsExtensions && !fileExtensionIs(filename, ".ts")) {
|
||||
if (!options.allowNonTsExtensions && !fileExtensionIs(host.getCanonicalFileName(filename), ".ts")) {
|
||||
diagnostic = Diagnostics.File_0_must_have_extension_ts_or_d_ts;
|
||||
}
|
||||
else if (!findSourceFile(filename, isDefaultLib, refFile, refPos, refEnd)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user