Skip to content

Commit

Permalink
Allow expando additions to an imported object in JavaScript - fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Jul 30, 2019
1 parent dbe9e3d commit 946a14f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
6 changes: 4 additions & 2 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29974,7 +29974,7 @@ namespace ts {
const symbol = getSymbolOfNode(node);
const target = resolveAlias(symbol);
if (target !== unknownSymbol) {
// For external modules symbol represent local symbol for an alias.
// 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.
// Based on symbol.flags we can compute a set of excluded meanings (meaning that resolved alias should not have,
Expand Down Expand Up @@ -30004,7 +30004,9 @@ namespace ts {
function checkImportBinding(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier) {
checkCollisionWithRequireExportsInGeneratedCode(node, node.name!);
checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name!);
checkAliasSymbol(node);
if (!isInJSFile(node)) {
checkAliasSymbol(node);
}
}

function checkImportDeclaration(node: ImportDeclaration) {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,4 @@ namespace ts {
isDebugInfoEnabled = true;
}
}
}
}

This file was deleted.

0 comments on commit 946a14f

Please sign in to comment.