forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dagre.d.ts
29 lines (25 loc) · 835 Bytes
/
dagre.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Type definitions for dagre 0.7.0
// Project: https://github.com/cpettitt/dagre
// Definitions by: Qinfeng Chen <https://github.com/qinfchen>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module Dagre{
interface DagreFactory {
graphlib: GraphLib;
layout(graph: Graph): void;
}
interface Graph {
new (): Graph;
edges(): string[];
edge(id: string): any;
nodes(): string[];
node(id: string): any;
setDefaultEdgeLabel(callback: () => void): Graph;
setEdge(sourceId: string, targetId: string): Graph;
setGraph(options: { [key: string]: any }): Graph;
setNode(id: string, node: { [key: string]: any }): Graph;
}
interface GraphLib {
Graph: Graph;
}
}
declare var dagre: Dagre.DagreFactory;