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

Function checkNodePositions

test/fixtures/snapshot/typescript.js:38571–38587  ·  view source on GitHub ↗
(node, aggressiveChecks)

Source from the content-addressed store, hash-verified

38569 ts.setTextRangePosEnd(element, pos, end);
38570 }
38571 function checkNodePositions(node, aggressiveChecks) {
38572 if (aggressiveChecks) {
38573 var pos_2 = node.pos;
38574 var visitNode_1 = function (child) {
38575 ts.Debug.assert(child.pos >= pos_2);
38576 pos_2 = child.end;
38577 };
38578 if (ts.hasJSDocNodes(node)) {
38579 for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
38580 var jsDocComment = _a[_i];
38581 visitNode_1(jsDocComment);
38582 }
38583 }
38584 forEachChild(node, visitNode_1);
38585 ts.Debug.assert(pos_2 <= node.end);
38586 }
38587 }
38588 function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) {
38589 visitNode(sourceFile);
38590 return;

Callers 1

visitNodeFunction · 0.85

Calls 3

visitNode_1Function · 0.85
forEachChildFunction · 0.85
assertMethod · 0.80

Tested by

no test coverage detected