(throwStatement, sourceFile)
| 135833 | return keywords; |
| 135834 | } |
| 135835 | function getThrowOccurrences(throwStatement, sourceFile) { |
| 135836 | var owner = getThrowStatementOwner(throwStatement); |
| 135837 | if (!owner) { |
| 135838 | return undefined; |
| 135839 | } |
| 135840 | var keywords = []; |
| 135841 | ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) { |
| 135842 | keywords.push(ts.findChildOfKind(throwStatement, 109 /* SyntaxKind.ThrowKeyword */, sourceFile)); |
| 135843 | }); |
| 135844 | // If the "owner" is a function, then we equate 'return' and 'throw' statements in their |
| 135845 | // ability to "jump out" of the function, and include occurrences for both. |
| 135846 | if (ts.isFunctionBlock(owner)) { |
| 135847 | ts.forEachReturnStatement(owner, function (returnStatement) { |
| 135848 | keywords.push(ts.findChildOfKind(returnStatement, 105 /* SyntaxKind.ReturnKeyword */, sourceFile)); |
| 135849 | }); |
| 135850 | } |
| 135851 | return keywords; |
| 135852 | } |
| 135853 | function getReturnOccurrences(returnStatement, sourceFile) { |
| 135854 | var func = ts.getContainingFunction(returnStatement); |
| 135855 | if (!func) { |
nothing calls this directly
no test coverage detected