Skip to content

Instantly share code, notes, and snippets.

@isacjunior
Last active March 1, 2018 13:17
Show Gist options
  • Save isacjunior/ac0cb1a194c1b3be7596065c2f16e679 to your computer and use it in GitHub Desktop.
Save isacjunior/ac0cb1a194c1b3be7596065c2f16e679 to your computer and use it in GitHub Desktop.
var _createClass = (function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
})();
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var PersonClass = (function() {
function PersonClass(name) {
_classCallCheck(this, PersonClass);
this.name = name;
}
_createClass(PersonClass, [
{
key: "sayName",
value: function sayName() {
console.log(this.name);
}
}
]);
return PersonClass;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment