import Graph, {Attributes} from 'graphology-types'; import {MinimalEdgeMapper} from 'graphology-utils/getters'; type SingleSourceDijkstraResult = {[key: string]: string[]}; type BidirectionalDijstraResult = string[]; type BrandesResult = [ Array, {[key: string]: Array}, {[key: string]: number} ]; export function bidirectional< NodeAttributes extends Attributes = Attributes, EdgeAttributes extends Attributes = Attributes >( graph: Graph, source: unknown, target: unknown, getEdgeWeight?: | keyof EdgeAttributes | MinimalEdgeMapper ): BidirectionalDijstraResult; export function singleSource< NodeAttributes extends Attributes = Attributes, EdgeAttributes extends Attributes = Attributes >( graph: Graph, source: unknown, getEdgeWeight?: | keyof EdgeAttributes | MinimalEdgeMapper ): SingleSourceDijkstraResult; export function brandes< NodeAttributes extends Attributes = Attributes, EdgeAttributes extends Attributes = Attributes >( graph: Graph, source: unknown, getEdgeWeight?: | keyof EdgeAttributes | MinimalEdgeMapper ): BrandesResult;