java -jar SoyToJsSrcCompiler.jar --shouldGenerateJsdoc --outputPathFormat
simple.js --srcs simple.soy
SoyToJsSrcCompiler generates a js file which looks like this:
if (typeof templates == 'undefined') { var templates = {}; }
if (typeof templates.simple == 'undefined') { templates.simple = {}; }
/**
* @param {Object.<string, *>=} opt_data
* @param {(null|undefined)=} opt_ignored
* @return {string}
* @notypecheck
*/
templates.simple.tinyButton = function(opt_data, opt_ignored) {
.....
};
I am using Closure Compiler with --warning_level=VERBOSE
and --compilation_level ADVANCED_OPTIMIZATIONS
and I am getting this warning:
simple.js:1: WARNING - Variable referenced before declaration: templates
if (typeof templates == 'undefined') { var templates = {}; }
How can I clear this warning?