rainforestapp / decaf

Coffeescript to ES.next transpiler. Now maintained over at
https://github.com/juliankrispel/decaf
MIT License
106 stars 10 forks source link

Handle destructuring `this` assignments in function args #151

Closed GoodForOneFare closed 8 years ago

GoodForOneFare commented 8 years ago

Converts ({@a}) -> to ({a}) => this.a = a.

I'd rather have handled the flattening of object pattern assignments elsewhere, but keeping it all inline is an easy way to maintain assignment order.

Adapted from @lemonmade's solution in Shopify/decaf.