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

Function eachUnreachableRange

test/fixtures/snapshot/typescript.js:47719–47728  ·  view source on GitHub ↗
(node, cb)

Source from the content-addressed store, hash-verified

47717 }
47718 }
47719 function eachUnreachableRange(node, cb) {
47720 if (ts.isStatement(node) && isExecutableStatement(node) && ts.isBlock(node.parent)) {
47721 var statements = node.parent.statements;
47722 var slice_1 = ts.sliceAfter(statements, node);
47723 ts.getRangesWhere(slice_1, isExecutableStatement, function (start, afterEnd) { return cb(slice_1[start], slice_1[afterEnd - 1]); });
47724 }
47725 else {
47726 cb(node, node);
47727 }
47728 }
47729 // As opposed to a pure declaration like an `interface`
47730 function isExecutableStatement(s) {
47731 // Don't remove statements that can validly be used before they appear.

Callers 1

checkUnreachableFunction · 0.85

Calls 2

isExecutableStatementFunction · 0.85
cbFunction · 0.50

Tested by

no test coverage detected