If I want to alias defining class using goog.scope, I should write like this:
=================================================
goog.provide('app.MyClass');
/**
* @constructor
*/
app.MyClass = function() {
/**
* @type {!app.SomeType}
* @private
*/
this.f_ = new app.SomeType();
};
goog.scope(function() {
var MyClass = app.MyClass;
MyClass.prototype.myMethod = function() {};
});
=================================================
I should put constructor outside goog.scope, because I couldn't alias it for prototype methods otherwise.
Putting constructor outside making me write fully qualified types in constructor and that's killing the whole idea.
Title question - is goog.scope() meant to alias defining class itself?
Or it's for dependencies only and I should write
long.path.MyClass.prototype.<myMethod> = ....
many times anyway?