refactor: reorganize code + optimization
This commit is contained in:
24
app/home/graph.ts
Normal file
24
app/home/graph.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
interface Node {
|
||||
key: string
|
||||
outs: Record<string, Connection>
|
||||
}
|
||||
|
||||
interface Entry {
|
||||
name: string
|
||||
stages: Node["key"][]
|
||||
}
|
||||
|
||||
interface Connection {
|
||||
nodeKey: Node["key"]
|
||||
weight: number
|
||||
}
|
||||
|
||||
const DEFAULT_NODE = {
|
||||
applicationSubmittedNode: {
|
||||
key: "Application submitted",
|
||||
outs: {},
|
||||
},
|
||||
} as const
|
||||
|
||||
export { DEFAULT_NODE }
|
||||
export type { Node, Entry, Connection }
|
Reference in New Issue
Block a user