Skip to content

Commit 44b13ee

Browse files
committed
Don't exclusively check for just JS but scope down the check to not include the expando'd objects
1 parent 8dd5706 commit 44b13ee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29974,9 +29974,8 @@ namespace ts {
2997429974
const symbol = getSymbolOfNode(node);
2997529975
const target = resolveAlias(symbol);
2997629976

29977-
const shouldSkipWithJSRequireTargets = !isInJSFile(node) && moduleKind !== ModuleKind.ES2015;
29978-
29979-
if (shouldSkipWithJSRequireTargets && target !== unknownSymbol) {
29977+
const shouldSkipWithJSExpandoTargets = symbol.flags & SymbolFlags.Assignment;
29978+
if (!shouldSkipWithJSExpandoTargets && target !== unknownSymbol) {
2998029979
// For external modules symbol represents local symbol for an alias.
2998129980
// This local symbol will merge any other local declarations (excluding other aliases)
2998229981
// and symbol.flags will contains combined representation for all merged declaration.

0 commit comments

Comments
 (0)