mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 01:49:41 -05:00
Remove seemingly unused SymbolLink constEnumReferenced (#58377)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user