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

Function getLastChild

test/fixtures/snapshot/typescript.js:19727–19742  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

19725 }
19726 ts.showModuleSpecifier = showModuleSpecifier;
19727 function getLastChild(node) {
19728 var lastChild;
19729 ts.forEachChild(node, function (child) {
19730 if (nodeIsPresent(child))
19731 lastChild = child;
19732 }, function (children) {
19733 // As an optimization, jump straight to the end of the list.
19734 for (var i = children.length - 1; i >= 0; i--) {
19735 if (nodeIsPresent(children[i])) {
19736 lastChild = children[i];
19737 break;
19738 }
19739 }
19740 });
19741 return lastChild;
19742 }
19743 ts.getLastChild = getLastChild;
19744 function addToSeen(seen, key, value) {
19745 if (value === void 0) { value = true; }

Callers

nothing calls this directly

Calls 2

nodeIsPresentFunction · 0.85
forEachChildMethod · 0.80

Tested by

no test coverage detected