Remove some unnecessary code discovered by rollup (#51204)

This commit is contained in:
Jake Bailey 2022-10-17 10:49:56 -07:00 committed by GitHub
parent 0481773a27
commit a1d82fc9dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41414,18 +41414,6 @@ namespace ts {
if (isGlobalAugmentation) {
return;
}
const symbol = getSymbolOfNode(node);
if (symbol) {
// module augmentations cannot introduce new names on the top level scope of the module
// this is done it two steps
// 1. quick check - if symbol for node is not merged - this is local symbol to this augmentation - report error
// 2. main check - report error if value declaration of the parent symbol is module augmentation)
let reportError = !(symbol.flags & SymbolFlags.Transient);
if (!reportError) {
// symbol should not originate in augmentation
reportError = !!symbol.parent?.declarations && isExternalModuleAugmentation(symbol.parent.declarations[0]);
}
}
break;
}
}