import Graph, { Attributes, NodePredicate, EdgePredicate } from 'graphology-types'; type LayoutMapping = {[key: string]: {x: number; y: number}}; export type ForceLayoutSettings = { attraction?: number; repulsion?: number; gravity?: number; inertia?: number; maxMove?: number; }; export type ForceLayoutParameters< NodeAttributes extends Attributes = Attributes, EdgeAttributes extends Attributes = Attributes > = { nodeXAttribute?: string; nodeYAttribute?: string; isNodeFixed?: string | NodePredicate; shouldSkipNode?: NodePredicate; shouldSkipEdge?: EdgePredicate; maxIterations?: number; settings?: ForceLayoutSettings; }; interface IForceLayout< NodeAttributes extends Attributes = Attributes, EdgeAttributes extends Attributes = Attributes > { ( graph: Graph, maxIterations: number ): LayoutMapping; ( graph: Graph, params: ForceLayoutParameters ): LayoutMapping; assign( graph: Graph, maxIterations: number ): void; assign( graph: Graph, params: ForceLayoutParameters ): void; } declare const forceLayout: IForceLayout; export default forceLayout;