export declare enum VertexMissing { CreateVertex = 0, IgnoreEdge = 1, AddEdge = 2, Error = 3, } export interface EdgeNode { id: string; type?: string; } export interface Edge { source: EdgeNode; destination: EdgeNode; isValid?: boolean; isVisible?: boolean; } export declare class Graph { vertices: Map; edges: Set; constructor(vertices?: Iterable<[string, any]>, edges?: Iterable<[string, string]>, missing?: VertexMissing); addVertex(key: string, data?: any, onConflict?: (old: any) => any): void; setVertexData(key: string, data?: any): void; getVertexData(key: string): any; hasVertex(key: string): boolean; removeVertex(key: string): boolean; addEdge(source: EdgeNode, destination: EdgeNode, isVisible?: boolean, isValid?: boolean, missing?: VertexMissing): void; removeEdge(edge: Edge | [string, string]): boolean; topSort(): Array; hasOutgoing(vertex: string, edges?: Set): boolean; hasIncoming(vertex: string, edges?: Set): boolean; isConnected(): boolean; private connectedIter(unvisited, unusedEdges, toExpand); private reached(unusedEdges, from); hasCycles(): boolean; private throwMissingVertex(key); }