Skip to content

Instantly share code, notes, and snippets.

@ariya
Created January 4, 2012 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ariya/1562832 to your computer and use it in GitHub Desktop.
Save ariya/1562832 to your computer and use it in GitHub Desktop.
Module example transpiled by Traceur
// What you write
module universe {
export var answer = 42;
}
// What Traceur produces
var universe =(function() {
"use strict";
Object.defineProperty(this, "answer", {
get: function() {
return answer;
},
enumerable: true
});
Object.freeze(this);
var answer = 42;
return this;
}).call(Object.create(null));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment