clean up types
This commit is contained in:
1 parent
6e6c6e09a6
commit
8e02468eab
1 file changed
+5
-9
@@ -1,16 +1,12 @@
|
|||||||
export type Point = [number, number];
|
export type Point = [number, number];
|
||||||
|
export type BBox = [Point, Point];
|
||||||
export interface Node {
|
export interface Node {
|
||||||
loc: Point;
|
loc: Point;
|
||||||
text: string;
|
text: string;
|
||||||
color: 'red' | 'blue' | 'green';
|
color: 'red' | 'blue' | 'green';
|
||||||
}
|
}
|
||||||
export interface Edge {
|
export type EdgeDirection = '1->2' | '1<->2' | '1<-2';
|
||||||
from: string;
|
export interface BoundedObj<J> {
|
||||||
to: string;
|
elm: J;
|
||||||
direction: '1->2' | '1<->2' | '1<-2';
|
bbox: BBox;
|
||||||
}
|
|
||||||
export type EdgeDirection = Edge['direction'];
|
|
||||||
export interface DAG {
|
|
||||||
nodes: Record<string, Node>;
|
|
||||||
edges: Array<Edge>;
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user