Skip to content

Commit

Permalink
Don't exclusively check for just JS but scope down the check to not i…
Browse files Browse the repository at this point in the history
…nclude the expando'd objects
  • Loading branch information
orta committed Jul 31, 2019
1 parent 8dd5706 commit 44b13ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29974,9 +29974,8 @@ namespace ts {
const symbol = getSymbolOfNode(node);
const target = resolveAlias(symbol);

const shouldSkipWithJSRequireTargets = !isInJSFile(node) && moduleKind !== ModuleKind.ES2015;

if (shouldSkipWithJSRequireTargets && target !== unknownSymbol) {
const shouldSkipWithJSExpandoTargets = symbol.flags & SymbolFlags.Assignment;
if (!shouldSkipWithJSExpandoTargets && target !== unknownSymbol) {
// For external modules symbol represents local symbol for an alias.
// This local symbol will merge any other local declarations (excluding other aliases)
// and symbol.flags will contains combined representation for all merged declaration.
Expand Down

0 comments on commit 44b13ee

Please sign in to comment.