From 23dde17194edb599f6331d74f5b6d5afaeacced7 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 5 Jan 2015 15:02:21 +0100 Subject: [PATCH] fix #1593 - also honour allowNonTsExtensions flag when there is no extension --- src/compiler/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 491735882f8..543c036d5cb 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -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"; }