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

Function tryMerge

test/fixtures/snapshot/typescript.js:141252–141262  ·  view source on GitHub ↗
(a, b, bIndex, parent)

Source from the content-addressed store, hash-verified

141250 return bAssignmentDeclarationKind === 0 /* AssignmentDeclarationKind.None */ ? false : true;
141251 }
141252 function tryMerge(a, b, bIndex, parent) {
141253 // const v = false as boolean;
141254 if (tryMergeEs5Class(a, b, bIndex, parent)) {
141255 return true;
141256 }
141257 if (shouldReallyMerge(a.node, b.node, parent)) {
141258 merge(a, b);
141259 return true;
141260 }
141261 return false;
141262 }
141263 /** a and b have the same name, but they may not be mergeable. */
141264 function shouldReallyMerge(a, b, parent) {
141265 if (a.kind !== b.kind || a.parent !== b.parent && !(isOwnChild(a, parent) && isOwnChild(b, parent))) {

Callers 1

mergeChildrenFunction · 0.85

Calls 3

tryMergeEs5ClassFunction · 0.85
shouldReallyMergeFunction · 0.85
mergeFunction · 0.70

Tested by

no test coverage detected