(node)
| 82295 | } |
| 82296 | // this function will run after checking the source file so 'CaptureThis' is correct for all nodes |
| 82297 | function checkIfThisIsCapturedInEnclosingScope(node) { |
| 82298 | ts.findAncestor(node, function (current) { |
| 82299 | if (getNodeCheckFlags(current) & 4 /* NodeCheckFlags.CaptureThis */) { |
| 82300 | var isDeclaration_1 = node.kind !== 79 /* SyntaxKind.Identifier */; |
| 82301 | if (isDeclaration_1) { |
| 82302 | error(ts.getNameOfDeclaration(node), ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); |
| 82303 | } |
| 82304 | else { |
| 82305 | error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference); |
| 82306 | } |
| 82307 | return true; |
| 82308 | } |
| 82309 | return false; |
| 82310 | }); |
| 82311 | } |
| 82312 | function checkIfNewTargetIsCapturedInEnclosingScope(node) { |
| 82313 | ts.findAncestor(node, function (current) { |
| 82314 | if (getNodeCheckFlags(current) & 8 /* NodeCheckFlags.CaptureNewTarget */) { |
nothing calls this directly
no test coverage detected