Created
October 4, 2017 16:38
-
-
Save jakwuh/0321347f3a16e72b58729e3a79c8b804 to your computer and use it in GitHub Desktop.
c
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
Show hidden characters
{ | |
"presets": ["env"], | |
"plugins": [ | |
"transform-typescript", | |
"transform-class-properties" | |
] | |
} |
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
> npm test | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
var A = function A() { | |
_classCallCheck(this, A); | |
Object.defineProperty(this, "_x", { | |
configurable: true, | |
enumerable: true, | |
writable: true, | |
value: void 0 | |
}); | |
console.log(2); | |
}; |
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
> npm test | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
var A = function A() { | |
_classCallCheck(this, A); | |
console.log(2); | |
}; |
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 A { | |
private _x: number; | |
constructor() { | |
console.log(2); | |
} | |
} |
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
{ | |
"dependencies": { | |
"babel-cli": "^7.0.0-beta.2", | |
"babel-plugin-transform-class-properties": "^7.0.0-beta.2", | |
"babel-plugin-transform-typescript": "^7.0.0-beta.2", | |
"babel-preset-env": "^2.0.0-beta.2" | |
}, | |
"scripts": { | |
"test": "babel index.js" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment