Skip to main content

Module tsgraph

Module tsgraph 

Source
Expand description

Resolution of extracted TypeScript fragments into a graph.

Structs§

TsAliasScopes
A repo’s tsconfig alias reading, scoped per directory.
TsEdgeCounts
The four TS edge kinds’ counts, appended to stats.edges_by_kind in this order and only when the repo carries a TS fragment at all.
TsGraph
Represents TsGraph.
TsPathAliases
Represents TsPathAliases.
TsStats
stats.ts – appended inside stats after test_def_count, and only when the repo carries a TS fragment at all. heuristic_by_tier is the newer fact and follows it (see graph::Stats).

Functions§

read_ts_alias_scopes
Reads the root chain once, then finds each distinct directory files names an owner for: the nearest ancestor tsconfig.json above it that declares paths or baseUrl of its own.
read_ts_path_aliases
Reads the repo-root tsconfig chain into its aliases.
resolve_specifier
Relative specifiers resolve directly; a bare one resolves only as far as the repo’s own tsconfig paths/baseUrl already take it – the nearest owning scope to from_file, root when none owns it.
resolve_ts_graph
Resolves the TS/TSX graph: every file’s reference fragments into edges.
ts_def_id
Builds a TypeScript definition identifier from a file and symbol name.