Move `{Node,Edge}Type` to src/analysis/types.js (#946)
Test plan: `yarn test` Part of ongoing work on #704
This commit is contained in:
parent
917b793aca
commit
5f2cc56172
|
@ -0,0 +1,18 @@
|
|||
// @flow
|
||||
|
||||
import {type NodeAddressT, type EdgeAddressT} from "../core/graph";
|
||||
|
||||
export type EdgeType = {|
|
||||
+forwardName: string,
|
||||
+backwardName: string,
|
||||
+defaultForwardWeight: number,
|
||||
+defaultBackwardWeight: number,
|
||||
+prefix: EdgeAddressT,
|
||||
|};
|
||||
|
||||
export type NodeType = {|
|
||||
+name: string,
|
||||
+pluralName: string,
|
||||
+prefix: NodeAddressT,
|
||||
+defaultWeight: number,
|
||||
|};
|
|
@ -5,12 +5,8 @@ import {NodeTrie, EdgeTrie} from "../../core/trie";
|
|||
import type {Assets} from "../assets";
|
||||
import type {RepoId} from "../../core/repoId";
|
||||
|
||||
import type {
|
||||
StaticPluginAdapter,
|
||||
DynamicPluginAdapter,
|
||||
NodeType,
|
||||
EdgeType,
|
||||
} from "./pluginAdapter";
|
||||
import type {StaticPluginAdapter, DynamicPluginAdapter} from "./pluginAdapter";
|
||||
import type {EdgeType, NodeType} from "../../analysis/types";
|
||||
|
||||
import {FallbackStaticAdapter} from "./fallbackAdapter";
|
||||
|
||||
|
|
|
@ -7,12 +7,8 @@ import {
|
|||
type NodeAddressT,
|
||||
EdgeAddress,
|
||||
} from "../../core/graph";
|
||||
import type {
|
||||
StaticPluginAdapter,
|
||||
DynamicPluginAdapter,
|
||||
EdgeType,
|
||||
NodeType,
|
||||
} from "./pluginAdapter";
|
||||
import type {StaticPluginAdapter, DynamicPluginAdapter} from "./pluginAdapter";
|
||||
import type {EdgeType, NodeType} from "../../analysis/types";
|
||||
|
||||
import {StaticAdapterSet} from "./adapterSet";
|
||||
import {makeRepoId, type RepoId} from "../../core/repoId";
|
||||
|
|
|
@ -4,21 +4,7 @@ import {type Node as ReactNode} from "react";
|
|||
import {Graph, type NodeAddressT, type EdgeAddressT} from "../../core/graph";
|
||||
import type {Assets} from "../assets";
|
||||
import type {RepoId} from "../../core/repoId";
|
||||
|
||||
export type EdgeType = {|
|
||||
+forwardName: string,
|
||||
+backwardName: string,
|
||||
+defaultForwardWeight: number,
|
||||
+defaultBackwardWeight: number,
|
||||
+prefix: EdgeAddressT,
|
||||
|};
|
||||
|
||||
export type NodeType = {|
|
||||
+name: string,
|
||||
+pluralName: string,
|
||||
+prefix: NodeAddressT,
|
||||
+defaultWeight: number,
|
||||
|};
|
||||
import type {EdgeType, NodeType} from "../../analysis/types";
|
||||
|
||||
export interface StaticPluginAdapter {
|
||||
name(): string;
|
||||
|
|
|
@ -5,7 +5,7 @@ import {shallow} from "enzyme";
|
|||
|
||||
import * as NullUtil from "../../../util/null";
|
||||
import {NodeAddress, EdgeAddress} from "../../../core/graph";
|
||||
import type {NodeType, EdgeType} from "../../adapters/pluginAdapter";
|
||||
import type {EdgeType, NodeType} from "../../../analysis/types";
|
||||
import {
|
||||
AggregationRowList,
|
||||
AggregationRow,
|
||||
|
|
|
@ -4,7 +4,7 @@ import sortBy from "lodash.sortby";
|
|||
import stringify from "json-stable-stringify";
|
||||
import * as MapUtil from "../../../util/map";
|
||||
import {NodeTrie, EdgeTrie} from "../../../core/trie";
|
||||
import type {NodeType, EdgeType} from "../../adapters/pluginAdapter";
|
||||
import type {EdgeType, NodeType} from "../../../analysis/types";
|
||||
import type {ScoredConnection} from "../../../analysis/pagerankNodeDecomposition";
|
||||
|
||||
// Sorted by descending `summary.score`
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import * as MapUtil from "../../../util/map";
|
||||
import {type NodeAddressT, type EdgeAddressT} from "../../../core/graph";
|
||||
import type {NodeType, EdgeType} from "../../adapters/pluginAdapter";
|
||||
import type {EdgeType, NodeType} from "../../../analysis/types";
|
||||
import type {StaticPluginAdapter} from "../../adapters/pluginAdapter";
|
||||
import type {StaticAdapterSet} from "../../adapters/adapterSet";
|
||||
|
||||
|
|
Loading…
Reference in New Issue