(program, cancellationToken, sourceFile, position, sourceFilesToSearch)
| 135533 | var DocumentHighlights; |
| 135534 | (function (DocumentHighlights) { |
| 135535 | function getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch) { |
| 135536 | var node = ts.getTouchingPropertyName(sourceFile, position); |
| 135537 | if (node.parent && (ts.isJsxOpeningElement(node.parent) && node.parent.tagName === node || ts.isJsxClosingElement(node.parent))) { |
| 135538 | // For a JSX element, just highlight the matching tag, not all references. |
| 135539 | var _a = node.parent.parent, openingElement = _a.openingElement, closingElement = _a.closingElement; |
| 135540 | var highlightSpans = [openingElement, closingElement].map(function (_a) { |
| 135541 | var tagName = _a.tagName; |
| 135542 | return getHighlightSpanForNode(tagName, sourceFile); |
| 135543 | }); |
| 135544 | return [{ fileName: sourceFile.fileName, highlightSpans: highlightSpans }]; |
| 135545 | } |
| 135546 | return getSemanticDocumentHighlights(position, node, program, cancellationToken, sourceFilesToSearch) || getSyntacticDocumentHighlights(node, sourceFile); |
| 135547 | } |
| 135548 | DocumentHighlights.getDocumentHighlights = getDocumentHighlights; |
| 135549 | function getHighlightSpanForNode(node, sourceFile) { |
| 135550 | return { |
no test coverage detected