* Adds a statement to capture the `this` of a function declaration if it is needed. * NOTE: This must be executed *after* the subtree has been visited. * * @param statements The statements for the new function body. * @param node A node.
(statements, node)
| 99504 | * @param node A node. |
| 99505 | */ |
| 99506 | function insertCaptureThisForNodeIfNeeded(statements, node) { |
| 99507 | if (hierarchyFacts & 65536 /* HierarchyFacts.CapturedLexicalThis */ && node.kind !== 214 /* SyntaxKind.ArrowFunction */) { |
| 99508 | insertCaptureThisForNode(statements, node, factory.createThis()); |
| 99509 | return true; |
| 99510 | } |
| 99511 | return false; |
| 99512 | } |
| 99513 | /** |
| 99514 | * Assigns the `this` in a constructor to the result of its `super()` call. |
| 99515 | * |
no test coverage detected
searching dependent graphs…