Remove seemingly unused SymbolLink constEnumReferenced (#58377)

This commit is contained in:
Wesley Wigham
2024-04-30 11:35:09 -07:00
committed by GitHub
parent dc316afea4
commit 36146aa2ea
2 changed files with 0 additions and 13 deletions

View File

@@ -4291,15 +4291,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
}
// Aliases that resolve to const enums are not marked as referenced because they are not emitted,
// but their usage in value positions must be tracked to determine if the import can be type-only.
function markConstEnumAliasAsReferenced(symbol: Symbol) {
const links = getSymbolLinks(symbol);
if (!links.constEnumReferenced) {
links.constEnumReferenced = true;
}
}
// This function is only for imports with entity names
function getSymbolOfPartOfRightHandSideOfImportEquals(entityName: EntityName, dontResolveAlias?: boolean): Symbol | undefined {
// There are three things we might try to look for. In the following examples,
@@ -29202,9 +29193,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
) {
markAliasSymbolAsReferenced(symbol);
}
else {
markConstEnumAliasAsReferenced(symbol);
}
}
}
}

View File

@@ -5916,7 +5916,6 @@ export interface SymbolLinks {
inferredClassSymbol?: Map<SymbolId, TransientSymbol>; // Symbol of an inferred ES5 constructor function
mapper?: TypeMapper; // Type mapper for instantiation alias
referenced?: boolean; // True if alias symbol has been referenced as a value that can be emitted
constEnumReferenced?: boolean; // True if alias symbol resolves to a const enum and is referenced as a value ('referenced' will be false)
containingType?: UnionOrIntersectionType; // Containing union or intersection type for synthetic property
leftSpread?: Symbol; // Left source for synthetic spread property
rightSpread?: Symbol; // Right source for synthetic spread property