mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 16:34:39 -06:00
Remove some unnecessary code discovered by rollup (#51204)
This commit is contained in:
parent
0481773a27
commit
a1d82fc9dc
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user