Created
January 30, 2015 13:24
-
-
Save deepak/09929148538f2f85f87a to your computer and use it in GitHub Desktop.
ES6 classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by CoffeeScript 1.7.1 | |
(function() { | |
var Employee; | |
Employee = (function() { | |
function Employee() {} | |
Employee.prototype.doWork = function() { | |
return console.log("done"); | |
}; | |
return Employee; | |
})(); | |
}).call(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Employee | |
doWork: -> | |
console.log("done") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ES6 class | |
class Employee { | |
doWork() { | |
console.log("done"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; | |
var Employee = (function () { | |
function Employee() {} | |
_prototypeProperties(Employee, null, { | |
doWork: { | |
value: function doWork() { | |
console.log("done"); | |
}, | |
writable: true, | |
configurable: true | |
} | |
}); | |
return Employee; | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$traceurRuntime.ModuleStore.getAnonymousModule(function() { | |
"use strict"; | |
var Employee = function Employee() {}; | |
($traceurRuntime.createClass)(Employee, {doWork: function() { | |
console.log("done"); | |
}}, {}); | |
return {}; | |
}); | |
//# sourceURL=traceured.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment