MCPcopy Create free account
hub / github.com/nodejs/node / entryToDocumentSpan

Function entryToDocumentSpan

test/fixtures/snapshot/typescript.js:137142–137151  ·  view source on GitHub ↗
(entry)

Source from the content-addressed store, hash-verified

137140 }
137141 FindAllReferences.toReferenceEntry = toReferenceEntry;
137142 function entryToDocumentSpan(entry) {
137143 if (entry.kind === 0 /* EntryKind.Span */) {
137144 return { textSpan: entry.textSpan, fileName: entry.fileName };
137145 }
137146 else {
137147 var sourceFile = entry.node.getSourceFile();
137148 var textSpan = getTextSpan(entry.node, sourceFile);
137149 return __assign({ textSpan: textSpan, fileName: sourceFile.fileName }, toContextSpan(textSpan, sourceFile, entry.context));
137150 }
137151 }
137152 function getPrefixAndSuffixText(entry, originalNode, checker) {
137153 if (entry.kind !== 0 /* EntryKind.Span */ && ts.isIdentifier(originalNode)) {
137154 var node = entry.node, kind = entry.kind;

Callers 4

toRenameLocationFunction · 0.85
toReferenceEntryFunction · 0.85
toImplementationLocationFunction · 0.85
toHighlightSpanFunction · 0.85

Calls 2

getTextSpanFunction · 0.85
toContextSpanFunction · 0.85

Tested by

no test coverage detected