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

Function betterMatch

test/fixtures/snapshot/typescript.js:142563–142565  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

142561 return bestMatch;
142562 }
142563 function betterMatch(a, b) {
142564 return ts.min(a, b, compareMatches);
142565 }
142566 function compareMatches(a, b) {
142567 return a === undefined ? 1 /* Comparison.GreaterThan */ : b === undefined ? -1 /* Comparison.LessThan */
142568 : ts.compareValues(a.kind, b.kind) || ts.compareBooleans(!a.isCaseSensitive, !b.isCaseSensitive);

Callers 2

getFullMatchFunction · 0.85
matchSegmentFunction · 0.85

Calls 1

minMethod · 0.45

Tested by

no test coverage detected