Last active
March 1, 2018 13:17
-
-
Save isacjunior/ac0cb1a194c1b3be7596065c2f16e679 to your computer and use it in GitHub Desktop.
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
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