Skip to content

Commit

Permalink
typescript(vx-network): add types file
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Williams committed Sep 24, 2019
1 parent a22ff3d commit 2f7922a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/vx-network/src/types.ts
@@ -0,0 +1,22 @@
export interface DefaultNode {
x: number;
y: number;
}

export interface Link<Node> {
source: Node;
target: Node;
}

export interface Graph<Link, Node> {
links: Link[];
nodes: Node[];
}

export interface LinkProvidedProps<Link> {
link: Link;
}

export interface NodeProvidedProps<Node> {
node: Node;
}

0 comments on commit 2f7922a

Please sign in to comment.