Last active
October 7, 2015 10:03
-
-
Save SerafimArts/9e24db3ad5e71e0b3431 to your computer and use it in GitHub Desktop.
This file contains 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 Test | |
constructor: (a, b) -> | |
console.log(a, b); | |
method: -> | |
# method | |
@method: -> | |
# static | |
This file contains 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 Test { | |
constructor(a, b) { | |
console.log(a, b); | |
} | |
method() { | |
// method | |
} | |
static method() { | |
// static | |
} | |
} |
This file contains 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 Test; | |
Test = (function() { | |
function Test(a, b) { | |
console.log(a, b); | |
} | |
Test.prototype.method = function() {}; | |
Test.method = function() {}; | |
return Test; | |
})(); |
This file contains 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 _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 Test = (function () { | |
function Test(a, b) { | |
_classCallCheck(this, Test); | |
console.log(a, b); | |
} | |
_createClass(Test, [{ | |
key: "method", | |
value: function method() { | |
// method | |
} | |
}], [{ | |
key: "method", | |
value: function method() { | |
// static | |
} | |
}]); | |
return Test; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment