max_template_expansion_depth
Stable constant · Load-time lowering and templates
Tier: stable · Kind: constant · Topic: Load-time lowering and templates
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
| not exported | MAX_TEMPLATE_EXPANSION_DEPTH | MAX_TEMPLATE_EXPANSION_DEPTH | not exported | MaxTemplateExpansionDepth |
Julia
Julia does not export this constant.
TypeScript
const MAX_TEMPLATE_EXPANSION_DEPTH: 64
Maximum template-body reference-chain depth (counted in TEMPLATES along the
longest chain, so a 65-template chain is rejected while a 64-template chain
is accepted) before a file is rejected with
operator_body_expansion_too_deep (esm-spec §9.7.3). Pinned identically
across all bindings. It equals MAX_REWRITE_PASSES: a rewrite of depth d
writes a body-reference chain d templates deep, so every document the
rewriter accepts also reloads once emitted with its references.
Python
MAX_TEMPLATE_EXPANSION_DEPTH = 64
Maximum template-body reference-chain depth (counted in TEMPLATES along the
longest chain, so a 65-template chain is rejected and a 64-template chain is
accepted) before a file is rejected with template_body_expansion_too_deep
(esm-spec §9.7.3). Pinned identically across all bindings. It equals
MAX_REWRITE_PASSES: a rewrite of depth d writes a body-reference chain
d templates deep, so every document the rewriter accepts also reloads
once emitted with its references.
Rust
Rust does not export this constant.
Go
const MaxTemplateExpansionDepth = 64
MaxTemplateExpansionDepth is the maximum template-body reference-chain depth (counted in TEMPLATES along the longest chain, so a 65-template chain is rejected and a 64-template chain is accepted) before a file is rejected with operator_body_expansion_too_deep (esm-spec §9.7.3). Pinned identically across all bindings. It equals MaxRewritePasses: a rewrite of depth d writes a body-reference chain d templates deep, so every document the rewriter accepts also reloads once emitted with its references.