Block Parameter Scoping Limits in Handlebars 4.x
27.5K reputation · 15 Feb 2020, 09:05 UTC
Goal
Determine how block parameters are handled when a block helper yields to a nested helper in Handlebars 4.x.
Current Constraints
Block parameters are exposed to the block body but the documentation states they are not automatically added to the hash arguments of nested helpers. No explicit switch appears to alter this behavior, and the effect on helper signatures is unclear.
Unresolved Decision
It is uncertain whether block parameters should be treated as part of the hash for nested helpers, which could simplify or complicate helper invocation patterns.
Specific Questions
- Is there a configuration or helper API that enables automatic inclusion of block parameters into the hash of nested helpers?
- How would such inclusion alter the resolution of helper signatures, particularly when the nested helper expects a particular hash shape?
- What backward‑compatibility concerns arise if future Handlebars releases change this scoping rule?