import * as ts from "typescript"; export declare class ControlFlowGraph { private startBlock; readonly end: CfgEndBlock; private readonly blocks; readonly start: CfgBlock; constructor(start: CfgBlock, end: CfgEndBlock, blocks?: CfgBlock[]); private finalize; static fromStatements(statements: ts.Statement[]): ControlFlowGraph | undefined; getBlocks(): CfgBlock[]; getEndPredecessors(): CfgBlock[]; findLoopingBlock(loopNode: ts.Node): CfgBlock | undefined; private collapseEmpty; private makeBidirectional; } export interface CfgBlock { loopingStatement: ts.IterationStatement | undefined; branchingElement: ts.Node | undefined; successorWithoutJump: CfgBlock | undefined; predecessors?: CfgBlock[]; addElement(element: ts.Node): void; getElements(): ts.Node[]; getSuccessors(): CfgBlock[]; replaceSuccessor(what: CfgBlock, withWhat: CfgBlock): void; replacePredecessor(what: CfgBlock, withWhat: CfgBlock): void; getLabel(): string; } export declare abstract class CfgBlockWithPredecessors { predecessors: CfgBlock[]; loopingStatement: ts.IterationStatement | undefined; branchingElement: ts.Node | undefined; successorWithoutJump: CfgBlock | undefined; replacePredecessor(what: CfgBlock, withWhat: CfgBlock): void; } export declare abstract class CfgBlockWithElements extends CfgBlockWithPredecessors { private elements; addElement(element: ts.Node): void; getElements(): ts.Node[]; getLabel(): string; } export declare class CfgGenericBlock extends CfgBlockWithElements implements CfgBlock { private successors; addSuccessor(successor: CfgBlock): void; getSuccessors(): CfgBlock[]; replaceSuccessor(what: CfgBlock, withWhat: CfgBlock): void; } export declare class CfgEndBlock extends CfgBlockWithPredecessors implements CfgBlock { addElement(_: ts.Node): CfgBlock; getElements(): ts.Node[]; addSuccessor(_: CfgBlock): void; getSuccessors(): CfgBlock[]; replaceSuccessor(_: CfgBlock, __: CfgBlock): void; getLabel(): string; } export declare class CfgBranchingBlock extends CfgBlockWithElements implements CfgBlock { private branchingLabel; private trueSuccessor; private falseSuccessor; constructor(branchingLabel: string, trueSuccessor: CfgBlock, falseSuccessor: CfgBlock, branchingElement: ts.Node); getTrueSuccessor(): CfgBlock; getFalseSuccessor(): CfgBlock; replaceSuccessor(what: CfgBlock, withWhat: CfgBlock): void; getLabel(): string; getSuccessors(): CfgBlock[]; }