If your template looks something like:
/**
* Foo
* @param rec
*/
{template .Foo}
<div>{$rec.var}</div>
{/template}
Then the SoyToJsSrcCompiler will produce code similar to:
/**
* @param {Object.<string, *>=} opt_data
* @param {(null|undefined)=} opt_ignored
* @return {string}
* @notypecheck
*/
namespace.Foo = function(opt_data, opt_ignored) {
return '<div>' + soy.$$escapeHtml(opt_data.rec.var) + '</div>';
};
This generated template function is meant to be included in the compilation with your source file. Since the output property access is of the form rec.var
the compiler should rename it correctly.