(expr *ast.Node)
| 2618 | } |
| 2619 | |
| 2620 | func containsNarrowableReference(expr *ast.Node) bool { |
| 2621 | if isNarrowableReference(expr) { |
| 2622 | return true |
| 2623 | } |
| 2624 | if expr.Flags&ast.NodeFlagsOptionalChain != 0 { |
| 2625 | switch expr.Kind { |
| 2626 | case ast.KindPropertyAccessExpression, ast.KindElementAccessExpression, ast.KindCallExpression, ast.KindNonNullExpression: |
| 2627 | return containsNarrowableReference(expr.Expression()) |
| 2628 | } |
| 2629 | } |
| 2630 | return false |
| 2631 | } |
| 2632 | |
| 2633 | func isNarrowableReference(node *ast.Node) bool { |
| 2634 | switch node.Kind { |
no test coverage detected