diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index bf6d0c20f6..9ab2e2fbe2 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1385,8 +1385,7 @@ namespace ts { function checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation: Node, name: __String, meaning: SymbolFlags): boolean { if (meaning & (SymbolFlags.Value & ~SymbolFlags.NamespaceModule & ~SymbolFlags.Type)) { const symbol = resolveSymbol(resolveName(errorLocation, name, SymbolFlags.NamespaceModule & ~SymbolFlags.Value, /*nameNotFoundMessage*/undefined, /*nameArg*/ undefined, /*isUse*/ false)); - // TODO: WRONG - if (symbol && !isInJavaScriptFile(errorLocation)) { + if (symbol) { error(errorLocation, Diagnostics.Cannot_use_namespace_0_as_a_value, unescapeLeadingUnderscores(name)); return true; }