LiquidPropertiesDrop.liquidMethodMissing() method
Resolves a missing property and performs nested substitutions.
Signature
liquidMethodMissing(key: string, context: liquidjs.Context): Promise<any>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
string |
The property name requested by the template. |
|
context |
liquidjs.Context |
The Liquid rendering context. |
Returns
Promise<any>
The resolved property value.
Exceptions
TemplateError If the property is not defined.
Remarks
Called by the Liquid engine when a property is accessed that doesn't exist as a regular method. This implements the Drop pattern for dynamic property resolution.
Resolution process:
- Validate the property exists, throw
InputErrorif not. - Retrieve the property value (string, array, or object).
- If object, return as-is for Liquid to access nested properties.
- If array, join elements into a single string for processing.
- If the value contains Liquid syntax, recursively render it with the current context to resolve nested references.
- Return the final resolved value.
Array values are concatenated without separators, allowing properties to span multiple lines in JSON while producing a single string output.
Generated via tsdoc2docusaurus 1.3.2 by API Extractor/Documenter 7.57.2.