From a1d82fc9dcced6ca6bde6e21c385d152d083679f Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 17 Oct 2022 10:49:56 -0700 Subject: [PATCH] Remove some unnecessary code discovered by rollup (#51204) --- src/compiler/checker.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d439ec7db6350..9d4e0a8341b9d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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; } }