Skip to content

rune-langium / core/src / getElementNamespace

Function: getElementNamespace() ​

ts
function getElementNamespace(element): string | undefined;

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

Return the dot-separated namespace string for an element whose direct $container is a RosettaModel. Returns undefined when the element isn't a top-level model child — which is what every typeRef target is (Data, Choice, RosettaTypeAlias, RosettaEnumeration, RosettaFunction all live as direct children of RosettaModel via model.elements).

The model's namespace lives in name: QualifiedName | string. Behavior mirrors the private helpers that were duplicated in ts-emitter.ts:131 and zod-emitter.ts:148 — those will be deleted as a follow-up once both emitters route through this module.

Parameters ​

ParameterType
element{ $container?: unknown; }
element.$container?unknown

Returns ​

string | undefined

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