mirror of
https://github.com/status-im/sourcecred.git
synced 2025-02-18 15:38:10 +00:00
27 lines
397 B
JavaScript
27 lines
397 B
JavaScript
// @flow
|
|
|
|
export type ID = {
|
|
pluginName: string,
|
|
repositoryName: string,
|
|
name: string,
|
|
};
|
|
|
|
export type GraphNode<T> = {
|
|
id: ID,
|
|
edges: ID[],
|
|
payload: T,
|
|
};
|
|
|
|
export type GraphEdge<T> = {
|
|
id: ID,
|
|
sourceId: ID,
|
|
destId: ID,
|
|
weight: number,
|
|
payload: T,
|
|
};
|
|
|
|
export type Graph = {
|
|
nodes: {[stringID: string]: GraphNode<mixed>},
|
|
edges: {[stringID: string]: GraphEdge<mixed>},
|
|
};
|