(privId)
| 74540 | } |
| 74541 | } |
| 74542 | function checkGrammarPrivateIdentifierExpression(privId) { |
| 74543 | if (!ts.getContainingClass(privId)) { |
| 74544 | return grammarErrorOnNode(privId, ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); |
| 74545 | } |
| 74546 | if (!ts.isForInStatement(privId.parent)) { |
| 74547 | if (!ts.isExpressionNode(privId)) { |
| 74548 | return grammarErrorOnNode(privId, ts.Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression); |
| 74549 | } |
| 74550 | var isInOperation = ts.isBinaryExpression(privId.parent) && privId.parent.operatorToken.kind === 101 /* SyntaxKind.InKeyword */; |
| 74551 | if (!getSymbolForPrivateIdentifierExpression(privId) && !isInOperation) { |
| 74552 | return grammarErrorOnNode(privId, ts.Diagnostics.Cannot_find_name_0, ts.idText(privId)); |
| 74553 | } |
| 74554 | } |
| 74555 | return false; |
| 74556 | } |
| 74557 | function checkPrivateIdentifierExpression(privId) { |
| 74558 | checkGrammarPrivateIdentifierExpression(privId); |
| 74559 | var symbol = getSymbolForPrivateIdentifierExpression(privId); |
no test coverage detected
searching dependent graphs…