Skip to content

rune-langium / codegen/src/export / WholeModelEmitter

Interface: WholeModelEmitter ​

Defined in: packages/codegen/src/emit/namespace-emitter.ts:93

Emitter contract for targets that consume the entire model as a single input (rather than one namespace at a time). Used by targets that need cross-namespace state — e.g. Excel produces one workbook for the whole model with cross-sheet hyperlinks, GraphQL SDL produces one schema file with the full type graph. SQL and Markdown are per-namespace targets (see TARGET_DESCRIPTORS) — Copilot review on PR #165 caught an earlier draft of this comment listing SQL as whole-model.

Returns one or more GeneratorOutput entries. Most whole-model emitters return a single entry (the single artifact); the array return type leaves room for emitters that want to split into multiple files (e.g. an Excel emitter that produces both the workbook AND a sidecar manifest).

Async because binary emitters (ExcelJS) use stream APIs internally. The Task 0.4 dispatch in generator.ts awaits this method.

See ​

Methods ​

emit() ​

ts
emit(
   walks, 
   registry, 
   options
): Promise<GeneratorOutput[]>;

Defined in: packages/codegen/src/emit/namespace-emitter.ts:94

Parameters ​

ParameterType
walksReadonlyMap<string, NamespaceWalkResult>
registryNamespaceRegistry
optionsGeneratorOptions

Returns ​

Promise<GeneratorOutput[]>

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