I have a soy template that looks like
{template .fullView}
{@param people: list<[age:int, name:string]>}
{call .headers}
{param people: $queries /}
{/call}
{call .content}
{param people: $queries /}
{/call}
{/template}
{template .headers}
{@param people: list<[age:int, name:string]>}
# headers
{/template}
{template .content}
{@param queries: list<[age:int, name:string]>}
# content
{/template}
As the record definition for "people" has become more complex than just age and name it has become tedious to update the definition of the param in all three places. Is it possible to instead create an alias or something that could be reused in each template?
{alias [age:int, name:string] as Person}
{template .headers}
{@param people: list<Person>}
# headers
{/template}
Why not define a proto for
Person
instead? The docs also seems to recommend using protos over records:So you could define a message like this?