(sourceFile, node)
| 15348 | } |
| 15349 | ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; |
| 15350 | function getErrorSpanForArrowFunction(sourceFile, node) { |
| 15351 | var pos = ts.skipTrivia(sourceFile.text, node.pos); |
| 15352 | if (node.body && node.body.kind === 235 /* SyntaxKind.Block */) { |
| 15353 | var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line; |
| 15354 | var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line; |
| 15355 | if (startLine < endLine) { |
| 15356 | // The arrow function spans multiple lines, |
| 15357 | // make the error span be the first line, inclusive. |
| 15358 | return ts.createTextSpan(pos, getEndLinePosition(startLine, sourceFile) - pos + 1); |
| 15359 | } |
| 15360 | } |
| 15361 | return ts.createTextSpanFromBounds(pos, node.end); |
| 15362 | } |
| 15363 | function getErrorSpanForNode(sourceFile, node) { |
| 15364 | var errorNode = node; |
| 15365 | switch (node.kind) { |
no test coverage detected
searching dependent graphs…