Skip to content

extractControlFlow

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/parsers/backend/control-flow.ts

Read the guards and catches out of a class (or any node holding statements).

Only if statements whose branch is a single throw or return count as guards. A condition wrapping a block of real work is control flow but not a refusal, and calling it one would put a sentence on the page that misdescribes the code.

Signature

ts
function extractControlFlow(node: ts.Node): ControlFlow

Parameters

NameType
nodets.Node

Returns: ControlFlow

Was this page helpful?

Download as PDF