Find references to `super` in the constructor of an extending class.
(classDeclaration, addNode)
| 138410 | } |
| 138411 | /** Find references to `super` in the constructor of an extending class. */ |
| 138412 | function findSuperConstructorAccesses(classDeclaration, addNode) { |
| 138413 | var constructor = getClassConstructorSymbol(classDeclaration.symbol); |
| 138414 | if (!(constructor && constructor.declarations)) { |
| 138415 | return; |
| 138416 | } |
| 138417 | for (var _i = 0, _a = constructor.declarations; _i < _a.length; _i++) { |
| 138418 | var decl = _a[_i]; |
| 138419 | ts.Debug.assert(decl.kind === 171 /* SyntaxKind.Constructor */); |
| 138420 | var body = decl.body; |
| 138421 | if (body) { |
| 138422 | forEachDescendantOfKind(body, 106 /* SyntaxKind.SuperKeyword */, function (node) { |
| 138423 | if (ts.isCallExpressionTarget(node)) { |
| 138424 | addNode(node); |
| 138425 | } |
| 138426 | }); |
| 138427 | } |
| 138428 | } |
| 138429 | } |
| 138430 | function hasOwnConstructor(classDeclaration) { |
| 138431 | return !!getClassConstructorSymbol(classDeclaration.symbol); |
| 138432 | } |
no test coverage detected