by riffraff · 15y ago · 0 comments
this.User = ...
but what use does it have? class User
it would compile to: (function() {
User = (function() {
function User() {}
return User;
})();
}).call(this);
while class @User
would compile to: (function() {
this.User = (function() {
function User() {}
return User;
})();
}).call(this);
ensuring that User is available from any file (since the top-level this === window in the browser).