|
|
|
|
|
by KenanSulayman
3838 days ago
|
|
Always getting 'app.js:22 Uncaught TypeError: Cannot set property 'kind' of undefined' :-( However, I doubt that I would use it - most of the 'modernizations' are really dependent on the context of each change and require some tweaking. For instance, ES6 classes do not allow for inline computed methods: const x = function () {};
x.prototype.a = wrapFunction(function(){});
--- this is impossible: --- class x {
a() wrapFunction(function(){}); // invalid :-(
}
So we're still required to use the explicit prototype way of declaring the class.Then you can't just rewrite all methods to arrow functions because they don't have prototypes, even when they're really tempting: var x = function () {};
x.prototype.a = <foo>;
---> var x = () => {};
x.prototype.a = <foo>; // cannot set a of undefined
...$0.02 |
|