diff --git a/src/backend/graph.js b/src/backend/graph.js index 0d392eb..2719114 100644 --- a/src/backend/graph.js +++ b/src/backend/graph.js @@ -1,21 +1,21 @@ // @flow -export type Address = { - repositoryName: string, - pluginName: string, - id: string, -}; +export type Address = {| + +repositoryName: string, + +pluginName: string, + +id: string, +|}; export type Node = {| - address: Address, - payload: T, + +address: Address, + +payload: T, |}; export type Edge = {| - address: Address, - src: Address, - dst: Address, - payload: T, + +address: Address, + +src: Address, + +dst: Address, + +payload: T, |}; export class Graph { diff --git a/src/backend/graph.test.js b/src/backend/graph.test.js index cc810dc..34ad801 100644 --- a/src/backend/graph.test.js +++ b/src/backend/graph.test.js @@ -9,7 +9,7 @@ describe("graph", () => { // array with undefined order. We use these functions to // canonicalize the ordering so that we can then test equality with // `expect(...).toEqual(...)`. - function sortedByAddress(xs: T[]) { + function sortedByAddress(xs: T[]) { function cmp(x1: T, x2: T) { const a1 = addressToString(x1.address); const a2 = addressToString(x2.address); @@ -17,7 +17,7 @@ describe("graph", () => { } return [...xs].sort(cmp); } - function expectSameSorted(xs: T[], ys: T[]) { + function expectSameSorted(xs: T[], ys: T[]) { expect(sortedByAddress(xs)).toEqual(sortedByAddress(ys)); }