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

Function maybeInstance

plugin/doc_comment.js:370–376  ·  view source on GitHub ↗
(type, path)

Source from the content-addressed store, hash-verified

368 }
369
370 function maybeInstance(type, path) {
371 if (type instanceof infer.Fn && /(?:^|\.)[A-Z][^\.]*$/.test(path)) {
372 var proto = type.getProp("prototype").getObjType();
373 if (proto instanceof infer.Obj) return infer.getInstance(proto);
374 }
375 return type;
376 }
377
378 function parseTypeOuter(scope, str, pos) {
379 pos = skipSpace(str, pos || 0);

Callers 2

postLoadDefFunction · 0.85
parseTypeInnerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…