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
- isWholeModelEmitter — runtime discriminator.
- 018 Phase 0 Task 0.2.
Methods
emit()
emit(
walks,
registry,
options
): Promise<GeneratorOutput[]>;Defined in: packages/codegen/src/emit/namespace-emitter.ts:94
Parameters
| Parameter | Type |
|---|---|
walks | ReadonlyMap<string, NamespaceWalkResult> |
registry | NamespaceRegistry |
options | GeneratorOptions |
Returns
Promise<GeneratorOutput[]>