MCPcopy Index your code
hub / github.com/nodejs/node / getJSCompletionEntries

Function getJSCompletionEntries

test/fixtures/snapshot/typescript.js:132403–132421  ·  view source on GitHub ↗
(sourceFile, position, uniqueNames, target, entries)

Source from the content-addressed store, hash-verified

132401 return;
132402 }
132403 function getJSCompletionEntries(sourceFile, position, uniqueNames, target, entries) {
132404 ts.getNameTable(sourceFile).forEach(function (pos, name) {
132405 // Skip identifiers produced only from the current location
132406 if (pos === position) {
132407 return;
132408 }
132409 var realName = ts.unescapeLeadingUnderscores(name);
132410 if (!uniqueNames.has(realName) && ts.isIdentifierText(realName, target)) {
132411 uniqueNames.add(realName);
132412 ts.insertSorted(entries, {
132413 name: realName,
132414 kind: "warning" /* ScriptElementKind.warning */,
132415 kindModifiers: "",
132416 sortText: Completions.SortText.JavascriptIdentifiers,
132417 isFromUncheckedFile: true
132418 }, compareCompletionEntries);
132419 }
132420 });
132421 }
132422 function completionNameForLiteral(sourceFile, preferences, literal) {
132423 return typeof literal === "object" ? ts.pseudoBigIntToString(literal) + "n" :
132424 ts.isString(literal) ? ts.quote(sourceFile, preferences, literal) : JSON.stringify(literal);

Callers 1

completionInfoFromDataFunction · 0.85

Calls 3

forEachMethod · 0.65
hasMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected