Skip to main content

Module tsgraph

Module tsgraph 

Source
Expand description

Resolution of extracted TypeScript fragments into a graph.

Structs§

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 LAST inside stats, and only when the repo carries a TS fragment at all.

Functions§

read_ts_path_aliases
paths and baseUrl are whole-property overrides in TypeScript’s own inheritance rule, not merged key by key – the nearest config that declares one wins it outright. paths entries resolve against that config’s own baseUrl when it has one, else against the directory the config sits in (TypeScript 4.1’s rule).
resolve_specifier
Relative specifiers resolve directly; a bare one resolves only as far as the repo’s OWN tsconfig paths/baseUrl already take it. Anything else is external – the TS-side counterpart of the C# graph’s cross-project handling, and never a guess at a package’s internals.
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.