-
Notifications
You must be signed in to change notification settings - Fork 32
/
tarjan-graph_vx.x.x.js
59 lines (52 loc) · 1.56 KB
/
tarjan-graph_vx.x.x.js
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// flow-typed signature: 6eb907beb5b688ae85f36e98791c25b5
// flow-typed version: <<STUB>>/tarjan-graph_v^1.0.1/flow_v0.76.0
/**
* This is an autogenerated libdef stub for:
*
* 'tarjan-graph'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'tarjan-graph' {
declare class Vertex {
constructor(name: string, successors: Array<string>): Vertex,
name: string,
successors: Array<string>,
index: number,
lowLink: number,
onStack: bool,
visited: bool,
reset(): void
}
declare class Graph {
constructor(): Graph,
vertices: Array<Vertex>,
add(key: string, descendants: Array<string> | string): Graph,
reset(): void,
addAndVerify(key: string, descendants: Array<string> | string): Graph,
dfs(visitor: (Vertex) => void): void,
getDescendants(string): Array<string>,
hasCycles(): bool,
getStronglyConnectedComponents(): Array<Array<Vertex>>,
getCycles(): Array<Array<Vertex>>,
clone(): Graph,
toDot(): string
}
declare export default typeof Graph;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
// Filename aliases
declare module 'tarjan-graph/index' {
declare module.exports: $Exports<'tarjan-graph'>;
}
declare module 'tarjan-graph/index.js' {
declare module.exports: $Exports<'tarjan-graph'>;
}