} ES5: "use strict"; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Foo = function Foo() { _classCallCheck(this, Foo); }; (function () { console.log("HI"); })(); Babel