We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a4c331 commit 3b9bbb3Copy full SHA for 3b9bbb3
1 file changed
src/compiler/checker.ts
@@ -18451,9 +18451,8 @@ namespace ts {
18451
checkGrammarDecorators(node) || checkGrammarModifiers(node);
18452
18453
checkVariableLikeDeclaration(node);
18454
- let func = getContainingFunction(node);
+ const func = getContainingFunction(node);
18455
if (hasModifier(node, ModifierFlags.ParameterPropertyModifier)) {
18456
- func = getContainingFunction(node);
18457
if (!(func.kind === SyntaxKind.Constructor && nodeIsPresent(func.body))) {
18458
error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);
18459
}
0 commit comments