import GraphNode, { GraphNodeInterface } from './GraphNode'; import { NodeData } from './types'; type NodesList = Map, GraphNode>; interface GraphInterface { nodes: NodesList; addEdge(source: NodeData, destination: NodeData, edgeScore: number): ReadonlyArray>; addNode(data: NodeData): GraphNodeInterface; removeNode(data: NodeData): boolean | undefined; removeEdge(source: NodeData, destination: NodeData): ReadonlyArray | null | undefined>; } export default class Graph implements GraphInterface { constructor(); nodes: NodesList; addEdge(source: NodeData, destination: NodeData, edgeScore: number): ReadonlyArray>; addNode(data: NodeData): GraphNodeInterface; removeNode(data: NodeData): boolean | undefined; removeEdge(source: NodeData, destination: NodeData): ReadonlyArray | null | undefined>; findLowestScore(startNode: NodeData): { lowestScore: number | null; lowestScoreNode: NodeData; }; } export {};