rune-langium / core/src / serializeModels
Function: serializeModels()
ts
function serializeModels(models): Map<string, string>;Defined in: packages/core/src/serializer/rosetta-serializer.ts:388
Serialize multiple RosettaModel nodes, returning a Map of namespace → source text.
Parameters
| Parameter | Type | Description |
|---|---|---|
models | unknown[] | Array of duck-typed RosettaModel AST nodes. |
Returns
Map<string, string>
Map<namespace, rosettaSource> with one entry per unique namespace.
Remarks
If two models share the same namespace string, the later entry overwrites the earlier one in the result Map without warning.
Use When
- Batch-exporting a full CDM/DRR workspace to
.rosettafiles - Building a zip archive of serialized models keyed by namespace
Pitfalls
- Duplicate namespaces are silently overwritten — validate namespace uniqueness before calling this function.