clean up types

This commit is contained in:
ari committed 2021-11-30 16:55:00 -05:00
1 parent 6e6c6e09a6
commit 8e02468eab
1 file changed
+5 -9
+5 -9
View File
@@ -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>;
} }