{"size": 581, "ext": "js", "max_stars_repo_path": "src/explorer/adapters/explorerAdapter.js", "max_stars_repo_name": "yehia67/sourcecred", "max_stars_repo_stars_event_min_datetime": "2019-04-06T05:50:45.000Z", "max_stars_repo_stars_event_max_datetime": "2020-08-14T10:54:46.000Z", "max_issues_repo_path": "src/explorer/adapters/explorerAdapter.js", "max_issues_repo_name": "yehia67/sourcecred", "max_issues_repo_issues_event_min_datetime": "2019-04-05T17:04:33.000Z", "max_issues_repo_issues_event_max_datetime": "2019-04-13T21:54:58.000Z", "max_forks_repo_path": "src/explorer/adapters/explorerAdapter.js", "max_forks_repo_name": "yehia67/sourcecred", "max_forks_repo_forks_event_min_datetime": "2019-04-18T10:15:30.000Z", "max_forks_repo_forks_event_max_datetime": "2020-06-26T23:48:57.000Z"}
{"max_stars_count": 4, "max_issues_count": 7, "max_forks_count": 2, "avg_line_length": 30.5789473684, "max_line_length": 72, "alphanum_fraction": 0.7366609294}
// @flow

import {type Node as ReactNode} from "react";
import {Graph, type NodeAddressT} from "../../core/graph";
import type {Assets} from "../../webutil/assets";
import type {RepoId} from "../../core/repoId";
import type {PluginDeclaration} from "../../analysis/pluginDeclaration";

export interface StaticExplorerAdapter {
  declaration(): PluginDeclaration;
  load(assets: Assets, repoId: RepoId): Promise<DynamicExplorerAdapter>;
}

export interface DynamicExplorerAdapter {
  graph(): Graph;
  nodeDescription(NodeAddressT): ReactNode;
  static (): StaticExplorerAdapter;
}
