(node, sourceFiles, checker, cancellationToken)
| 138648 | }]; |
| 138649 | } |
| 138650 | function getReferencesForStringLiteral(node, sourceFiles, checker, cancellationToken) { |
| 138651 | var type = ts.getContextualTypeFromParentOrAncestorTypeNode(node, checker); |
| 138652 | var references = ts.flatMap(sourceFiles, function (sourceFile) { |
| 138653 | cancellationToken.throwIfCancellationRequested(); |
| 138654 | return ts.mapDefined(getPossibleSymbolReferenceNodes(sourceFile, node.text), function (ref) { |
| 138655 | if (ts.isStringLiteralLike(ref) && ref.text === node.text) { |
| 138656 | if (type) { |
| 138657 | var refType = ts.getContextualTypeFromParentOrAncestorTypeNode(ref, checker); |
| 138658 | if (type !== checker.getStringType() && type === refType) { |
| 138659 | return nodeEntry(ref, 2 /* EntryKind.StringLiteral */); |
| 138660 | } |
| 138661 | } |
| 138662 | else { |
| 138663 | return ts.isNoSubstitutionTemplateLiteral(ref) && !ts.rangeIsOnSingleLine(ref, sourceFile) ? undefined : |
| 138664 | nodeEntry(ref, 2 /* EntryKind.StringLiteral */); |
| 138665 | } |
| 138666 | } |
| 138667 | }); |
| 138668 | }); |
| 138669 | return [{ |
| 138670 | definition: { type: 4 /* DefinitionKind.String */, node: node }, |
| 138671 | references: references |
| 138672 | }]; |
| 138673 | } |
| 138674 | // For certain symbol kinds, we need to include other symbols in the search set. |
| 138675 | // This is not needed when searching for re-exports. |
| 138676 | function populateSearchSymbolSet(symbol, location, checker, isForRename, providePrefixAndSuffixText, implementations) { |
no test coverage detected