Version: dev

emit_document

Stable function · Document I/O

Tier: stable · Kind: function · Topic: Document I/O

JuliaTypeScriptPythonRustGo
not exportedemitDocumentemit_documentnot exportednot exported

Julia

Julia does not export this function.

TypeScript

function emitDocument(rawSource: unknown, basePath: string, options?: TemplateResolveOptions): JsonObject

Produce the reference-preserving, self-contained emitted document (esm-spec §9.6.4 rule 5, RFC out-of-line-expression-templates §7.5) from a source document rawSource (a fixture, or an already-emitted document for the idempotency property; relative import refs resolve against basePath). Loads rawSource under Option B, then materializes each component’s surviving reference closure into its expression_templates block, drops consumed imports, and version-stamps esm: 0.9.0 when any reference/materialized entry remains (§9.6.4 rule 8). emitEsmString ∘ emitDocument is a byte-wise fixed point under reload. Mirrors the Julia reference emit_document.

Source

Python

emit_document(raw_source: Any, base_path: str) -> dict

Produce the reference-preserving, self-contained emitted document (esm-spec §9.6.4 rule 5, RFC out-of-line-expression-templates §7.5) from a source document (a fixture, or an already-emitted document for the idempotency property). Loads raw_source under Option B, then for every component builds its emitted expression_templates block — authored match-less entries first in authored order, then the materialized transitive closure of its surviving references (match-less), lexicographically sorted — drops consumed expression_template_imports, and version-stamps esm: 0.9.0 when any surviving reference or materialized entry remains (§9.6.4 rule 8). emit_esm_string ∘ emit_document is a byte-wise fixed point under reload.

Source

Rust

Rust does not export this function.

Go

Go does not export this function.