From d5210de233e61dc4b1df8572a714e5ccc91a4765 Mon Sep 17 00:00:00 2001 From: Renegade334 Date: Wed, 18 Jun 2025 18:04:38 +0200 Subject: [PATCH] experiment: remove SymbolConstructor ESSymbolType transform --- src/compiler/checker.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 76e81a959790b..4b0fa5d0ad1da 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -12355,10 +12355,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function widenTypeForVariableLikeDeclaration(type: Type | undefined, declaration: any, reportErrors?: boolean) { if (type) { - // TODO: If back compat with pre-3.0/4.0 libs isn't required, remove the following SymbolConstructor special case transforming `symbol` into `unique symbol` - if (type.flags & TypeFlags.ESSymbol && isGlobalSymbolConstructor(declaration.parent)) { - type = getESSymbolLikeTypeForNode(declaration); - } if (reportErrors) { reportErrorsFromWidening(declaration, type); }