Skip to content

Commit 9243415

Browse files
author
Orta
authored
Merge pull request microsoft#32626 from orta/fix-31312
Fixes making changes on JS imports
2 parents 4a26271 + 44b13ee commit 9243415

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

src/compiler/checker.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29986,8 +29986,10 @@ namespace ts {
2998629986
function checkAliasSymbol(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier | ExportSpecifier) {
2998729987
const symbol = getSymbolOfNode(node);
2998829988
const target = resolveAlias(symbol);
29989-
if (target !== unknownSymbol) {
29990-
// For external modules symbol represent local symbol for an alias.
29989+
29990+
const shouldSkipWithJSExpandoTargets = symbol.flags & SymbolFlags.Assignment;
29991+
if (!shouldSkipWithJSExpandoTargets && target !== unknownSymbol) {
29992+
// For external modules symbol represents local symbol for an alias.
2999129993
// This local symbol will merge any other local declarations (excluding other aliases)
2999229994
// and symbol.flags will contains combined representation for all merged declaration.
2999329995
// Based on symbol.flags we can compute a set of excluded meanings (meaning that resolved alias should not have,

src/compiler/debug.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,4 +258,4 @@ namespace ts {
258258
isDebugInfoEnabled = true;
259259
}
260260
}
261-
}
261+
}

tests/baselines/reference/propertyAssignmentOnImportedSymbol.errors.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)