Skip to content

rune-langium / core/src / closeNamespaceDependencies

Function: closeNamespaceDependencies() ​

ts
function closeNamespaceDependencies(source, deps): Set<string>;

Defined in: packages/core/src/analysis/cross-namespace-refs.ts:199

Compute the transitive closure of a single source namespace through the dep map produced by collectNamespaceDependencies. Returns the set of namespaces that must be included if source is selected (includes source itself).

Used by the modal's auto-select cascade on each toggle. O(N) per call where N is the number of reachable namespaces — cheap enough to recompute synchronously on every toggle.

Cycles between namespaces are absorbed naturally by the visited-set check; no explicit cycle detection needed.

Parameters ​

ParameterType
sourcestring
depsReadonlyMap<string, ReadonlySet<string>>

Returns ​

Set<string>

Core packages released under MIT. Studio app released under FSL-1.1-ALv2.