(sourceFile, span)
| 129391 | ts.getRefactorContextSpan = getRefactorContextSpan; |
| 129392 | /* @internal */ |
| 129393 | function getFixableErrorSpanExpression(sourceFile, span) { |
| 129394 | var token = getTokenAtPosition(sourceFile, span.start); |
| 129395 | // Checker has already done work to determine that await might be possible, and has attached |
| 129396 | // related info to the node, so start by finding the expression that exactly matches up |
| 129397 | // with the diagnostic range. |
| 129398 | var expression = ts.findAncestor(token, function (node) { |
| 129399 | if (node.getStart(sourceFile) < span.start || node.getEnd() > ts.textSpanEnd(span)) { |
| 129400 | return "quit"; |
| 129401 | } |
| 129402 | return ts.isExpression(node) && textSpansEqual(span, createTextSpanFromNode(node, sourceFile)); |
| 129403 | }); |
| 129404 | return expression; |
| 129405 | } |
| 129406 | ts.getFixableErrorSpanExpression = getFixableErrorSpanExpression; |
| 129407 | function mapOneOrMany(valueOrArray, f, resultSelector) { |
| 129408 | if (resultSelector === void 0) { resultSelector = ts.identity; } |
nothing calls this directly
no test coverage detected