MCPcopy Create free account
hub / github.com/arktypeio/arktype / alwaysExits

Function alwaysExits

ark/aot/graph.ts:6758–6776  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

6756}
6757
6758const alwaysExits = (node: Node): boolean => {
6759 switch (node.type) {
6760 case "ReturnStatement":
6761 case "ThrowStatement":
6762 case "ContinueStatement":
6763 case "BreakStatement":
6764 return true
6765 case "BlockStatement":
6766 return node.body.some(alwaysExits)
6767 case "IfStatement":
6768 return (
6769 !!node.alternate &&
6770 alwaysExits(node.consequent) &&
6771 alwaysExits(node.alternate)
6772 )
6773 default:
6774 return false
6775 }
6776}
6777
6778const isBoundId = (
6779 node: Node,

Callers 1

isProvenNotFunctionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected