CodeQL library for JavaScript/TypeScript
codeql/javascript-all 1.0.3-dev (changelog, source)

Member predicate ControlFlowEntryNode::isUnreachable

Holds if this node is unreachable, that is, it has no predecessors in the CFG. Entry nodes are always considered reachable.

Note that in a block of unreachable code, only the first node is unreachable in this sense. For instance, in

function foo() { return; s1; s2; }

s1 is unreachable, but s2 is not.

predicate isUnreachable()