From 7bb71dbdd7099c46aae45008af5028d4532183f6 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 13 Aug 2024 18:11:59 -0400 Subject: [PATCH] always report useDefineForClassFields-related errors even when disabled --- src/compiler/checker.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4cdd0531b1c..83f5a913596 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -34198,7 +34198,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & ModifierFlags.Static) - && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop)) ) { diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); }