Imported By is one of the interactive graphs Understand can draw of your code — call trees, dependencies, control flow, and more.
Imported By
Languages: Rust, WebTargets: Files
Variants: Classic, Cluster, Compare, Relationship, Simplified
Show what imports a selected JavaScript file or Rust entity, directly or indirectly.
For a selected JavaScript file, this shows an edge to each file that imports it, then recurses into each of those files’ own importers, building a multi-level tree. For a Rust entity, this shows an edge to each entity that imports it through a use statement, then recurses into each of those entities’ own importers the same way.
Rooted at constants.js below, the graph shows constants.js imported by utils.js and validators.js. utils.js is imported by api.js and components.js; validators.js is imported by components.js. components.js is imported by ui.js and data.js; api.js is imported by data.js. ui.js and data.js are each imported by app.js, which nothing imports. The inverse graph, Imports, shows the reverse relationship — everything the selected file or Rust entity imports, directly or indirectly.
See the following code and corresponding graph
// app.js
import { renderPage } from './ui.js';
import { loadData } from './data.js';
// ui.js
import { createButton, createForm } from './components.js';
// data.js
import { createForm } from './components.js';
import { fetchData } from './api.js';
// components.js
import { buildUrl } from './utils.js';
import { isValidInput } from './validators.js';
// api.js
import { buildUrl, delay } from './utils.js';
// utils.js
import { API_URL, TIMEOUT } from './constants.js';
// validators.js
import { MAX_RETRIES } from './constants.js';
// constants.js
Imported By - Classic
The Classic variant is similar to the Simplified variant, showing all relationships in a simple tree, but it uses a custom layout algorithm instead of Graphviz.
Imported By - Cluster
The Cluster variant groups entities by their containing class/file/architecture.
Imported By - Compare
The Compare variant shows how the graph has changed relative to the project's comparison database.
Imported By - Relationship
The Relationship variant filters the graph to only paths connecting the two entities.
Imported By - Simplified
The Simplified variant shows all relationships in a simple tree (no clusters)