Version: dev

apply_scope_injections

Stable function · Load-time lowering and templates

Tier: stable · Kind: function · Topic: Load-time lowering and templates

JuliaTypeScriptPythonRustGo
not exportedapplyScopeInjectionsnot exportedapply_scope_injectionsnot exported

Julia

Julia does not export this function.

TypeScript

function applyScopeInjections(raw: unknown, injected?: readonly unknown[]): JsonObject | null

esm-spec §9.7.10 forms A + B: if raw needs a scope-directed injection (a non-empty subsystem-ref edge list injected, or a coupling entry carrying an injection map), return a fresh plain-object tree with the injected imports folded into the target components’ own expression_template_imports, ready for resolveTemplateMachinery. Returns null when no injection applies, so the caller keeps its original fast path.

Source

Python

Python does not export this function.

Rust

pub fn apply_scope_injections(root: &mut Value, injected: &[Value]) -> Result<(), ExpressionTemplateError>

esm-spec §9.7.10 forms A + B: fold any scope-directed injection — a subsystem-ref edge’s injected import list (form A) or a coupling entry’s injection map (form B) — into the target components’ own expression_template_imports, in place, so the ordinary import resolver + §9.6.3 fixpoint lower the target under the consumer-chosen discretization. Runs BEFORE resolve_template_machinery; form B target diagnostics (template_inject_target_*) surface here.

Source · Rust docs

Go

Go does not export this function.