export type Node = string; export type EdgeObject = [Node, Node]; export type GraphObject = Record; export type EdgesObject = EdgeObject[]; export type NodeIdx = number; export type RefMap = Map; export type Edge = [NodeIdx, NodeIdx]; export type Graph = Set[]; export type LNode = { next?: LNode; value: NodeIdx; }; export type LRoot = { first: LNode; last: LNode; }; export declare function toposortWithEdges(edges: EdgesObject): Node[]; export declare function toposortWithGraph(graph: GraphObject): Node[]; export declare function toposort(nodes: Node[], edges: EdgesObject): Node[];