MCPcopy Index your code
hub / github.com/ternjs/tern / findDocs

Function findDocs

lib/tern.js:985–997  ·  view source on GitHub ↗
(srv, query, file)

Source from the content-addressed store, hash-verified

983 }
984
985 function findDocs(srv, query, file) {
986 var expr = findExpr(file, query);
987 var type = findExprType(srv, query, file, expr);
988 var inner = type.getType();
989 if (!inner) {
990 expr = findExprAround(file, query);
991 type = findExprType(srv, query, file, expr);
992 inner = type.getType();
993 }
994 var result = {url: type.url, doc: parseDoc(query, type.doc), type: infer.toString(type)};
995 if (inner) storeTypeDocs(query, inner, result);
996 return clean(result);
997 }
998
999 function storeTypeDocs(query, type, out) {
1000 if (!out.url) out.url = type.url;

Callers

nothing calls this directly

Calls 5

findExprTypeFunction · 0.85
findExprAroundFunction · 0.85
parseDocFunction · 0.85
storeTypeDocsFunction · 0.85
cleanFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…