mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
Updates based on feedback
This commit is contained in:
Vendored
+13
-8
@@ -11,22 +11,27 @@ export namespace graphlib {
|
||||
edge(id: any): any;
|
||||
nodes(): string[];
|
||||
node(id: any): any;
|
||||
setDefaultEdgeLabel(callback: () => void): Graph;
|
||||
setDefaultNodeLabel(callback: () => void): Graph;
|
||||
setDefaultEdgeLabel(callback: string|(() => string)): Graph;
|
||||
setDefaultNodeLabel(callback: string|(() => string)): Graph;
|
||||
setEdge(sourceId: string, targetId: string, options?: { [key: string]: any }, value?: string): Graph;
|
||||
setGraph(options: { [key: string]: any }): Graph;
|
||||
setEdge(params: {v: string, w: string, name?: string}, value?: string): Graph;
|
||||
setGraph(label: GraphLabel): Graph;
|
||||
setNode(id: string, node: { [key: string]: any }): Graph;
|
||||
graph(): GraphOptions;
|
||||
graph(): GraphLabel;
|
||||
|
||||
constructor(opt?: {});
|
||||
constructor(opt?: {directed?: boolean, multigraph?: boolean, compound?: boolean});
|
||||
setParent(name: string, parentName: string): void;
|
||||
hasNode(name: string): boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export interface GraphOptions {
|
||||
width: number;
|
||||
height: number;
|
||||
export interface GraphLabel {
|
||||
width?: number;
|
||||
height?: number;
|
||||
compound: boolean;
|
||||
rankdir: string;
|
||||
nodesep: number;
|
||||
edgesep: number;
|
||||
}
|
||||
|
||||
export function layout(graph: graphlib.Graph): void;
|
||||
|
||||
Reference in New Issue
Block a user