Skip to content

Commit 36146aa

Browse files
authored
Remove seemingly unused SymbolLink constEnumReferenced (#58377)
1 parent dc316af commit 36146aa

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

src/compiler/checker.ts

-12
Original file line numberDiff line numberDiff line change
@@ -4291,15 +4291,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
42914291
}
42924292
}
42934293

4294-
// Aliases that resolve to const enums are not marked as referenced because they are not emitted,
4295-
// but their usage in value positions must be tracked to determine if the import can be type-only.
4296-
function markConstEnumAliasAsReferenced(symbol: Symbol) {
4297-
const links = getSymbolLinks(symbol);
4298-
if (!links.constEnumReferenced) {
4299-
links.constEnumReferenced = true;
4300-
}
4301-
}
4302-
43034294
// This function is only for imports with entity names
43044295
function getSymbolOfPartOfRightHandSideOfImportEquals(entityName: EntityName, dontResolveAlias?: boolean): Symbol | undefined {
43054296
// There are three things we might try to look for. In the following examples,
@@ -29202,9 +29193,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2920229193
) {
2920329194
markAliasSymbolAsReferenced(symbol);
2920429195
}
29205-
else {
29206-
markConstEnumAliasAsReferenced(symbol);
29207-
}
2920829196
}
2920929197
}
2921029198
}

src/compiler/types.ts

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

0 commit comments

Comments
 (0)