always report useDefineForClassFields-related errors even when disabled
This commit is contained in:
Родитель
aa8a2c0bb4
Коммит
7bb71dbdd7
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче