Add new error message - Property {0} is used before its initialization.

This commit is contained in:
Alexander T 2018-07-03 14:39:58 +03:00
parent e13fd0c568
commit 6ff0ba644b
2 changed files with 5 additions and 1 deletions

View file

@ -17478,7 +17478,7 @@ namespace ts {
if (isInPropertyInitializer(node) &&
!isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)
&& !isPropertyDeclaredInAncestorClass(prop)) {
diagnosticMessage = error(right, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationName);
diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName);
}
else if (valueDeclaration.kind === SyntaxKind.ClassDeclaration &&
node.parent.kind !== SyntaxKind.TypeReference &&

View file

@ -2401,6 +2401,10 @@
"category": "Error",
"code": 2728
},
"Property '{0}' is used before its initialization.": {
"category": "Error",
"code": 2729
},
"Import declaration '{0}' is using private name '{1}'.": {
"category": "Error",