3 ms·
That'd be awesome. Submit a proposal! https://github.com/tc39/proposals https://github.com/tc39/proposals
by spraak 9y ago
That'd be awesome. Submit a proposal! https://github.com/tc39/proposals https://github.com/tc39/proposals
- supergreg 9y agoLooked around and there's a proposal for an easier way to bind `this` and some discussion about extending that to class methods: https://github.com/tc39/proposal-bind-operator/issues/39 https://github.com/tc39/proposal-bind-operator/issues/39 Using arrow functions at the class level would also solve this without adding new syntax. Edit, this is a thing already: https://babeljs.io/docs/plugins/transform-class-properties/ https://babeljs.io/docs/plugins/transform-class-properties/