I am trying to annotate my javascript so that closure doesnt rename all the symbols since i am working with vanilla javascript as well.
/**
* @constructor
* @expose
* @type{foo}
*/
foo = function (el, args) {
"use strict";
var s = "Hello World";
/*
* @expose
* @this {foo}
* @type {function}
*/
this.introduce = function () {
return s;
};
};
However the generated output when i run it through the closure compiler with advanced optimization is
foo = function() {
this.a = function() {
return"Hello World"
} };
How do i ask closure to preserve the name introduce since this will be called from an external javascript.