Expand description
Per-specifier dependency usage contracts (fallow trace --dependency).
Per-specifier usage of a dependency: the usage object of
fallow trace --dependency <package>.
The object counts how the code uses each imported name of a package. It
follows one hop through a project wrapper, for example
export const useAppSelector = useSelector.withTypes<RootState>(), and it
counts each use that it cannot resolve. The answer is syntactic: it reads
import bindings and call sites, not types.
Structs§
- Closure
File - One file of a
ConsumerClosure. - Consumer
Closure - The files that import the users of the dependency, found by a reverse walk of the import graph.
- Dependency
Usage - How the code uses each imported name of a dependency.
- Dependency
Usage Query - What a dependency usage trace reports.
- File
Level Unresolved - Uses that hide which names a file reads. The key set is closed in schema version 1.
- Site
Page Request - A request for one page of usage sites.
- Specifier
Unresolved - Uses of one imported name that the trace cannot resolve to a call. The key set is closed in schema version 1.
- Specifier
Usage - The usage of one imported name.
- Usage
Site - One use of the dependency in the code.
- Usage
Site Page - One page of usage sites.
- Usage
Wrapper - A top-level exported declarator that wraps an imported name. The trace follows one hop from the wrapper to its consumers.
Enums§
- Dependency
Usage Schema Version - Wire-shape version of the
DependencyUsageobject. - Usage
Confidence - How the usage was found.
- Usage
Query Error - An invalid
DependencyUsageQuery. - Usage
Site Kind - How the code uses the dependency at a site.
- Wrapper
Shape - The shape of a project wrapper.
Constants§
- DEFAULT_
USAGE_ SITE_ LIMIT - The default number of sites on a page.
- MAX_
USAGE_ CLOSURE_ DEPTH - The largest closure depth.
- MAX_
USAGE_ SITE_ LIMIT - The largest number of sites on a page.