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

Function findBestTypeForObjectLiteral

test/fixtures/snapshot/typescript.js:89194–89198  ·  view source on GitHub ↗
(source, unionTarget)

Source from the content-addressed store, hash-verified

89192 }
89193 }
89194 function findBestTypeForObjectLiteral(source, unionTarget) {
89195 if (ts.getObjectFlags(source) & 128 /* ObjectFlags.ObjectLiteral */ && someType(unionTarget, isArrayLikeType)) {
89196 return ts.find(unionTarget.types, function (t) { return !isArrayLikeType(t); });
89197 }
89198 }
89199 function findBestTypeForInvokable(source, unionTarget) {
89200 var signatureKind = 0 /* SignatureKind.Call */;
89201 var hasSignatures = getSignaturesOfType(source, signatureKind).length > 0 ||

Callers 1

getBestMatchingTypeFunction · 0.85

Calls 3

someTypeFunction · 0.85
isArrayLikeTypeFunction · 0.85
findMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…