Civet icon indicating copy to clipboard operation
Civet copied to clipboard

`coffeeCompat` thicc arrow function in classes

Open STRd6 opened this issue 3 years ago • 3 comments

class X
  y: => b

https://coffeescript.org/#try:class%20X%0A%20%20y%3A%20%3D%3E%20b

STRd6 avatar Dec 15 '22 18:12 STRd6

This seems to be supported now: https://civet.dev/playground?code=J2NpdmV0IGNvZmZlZUNsYXNzZXMnCgpjbGFzcyBYCiAgeTogPT4gYg%3D%3D

Or was it about using => vs bind?

bbrk24 avatar Apr 15 '24 02:04 bbrk24

Yes, I think the point is to add the bind wrapper (and maybe also switch the function into a method declaration), for CoffeeScript compatibility.

edemaine avatar Apr 15 '24 15:04 edemaine

You're right; I just checked, and the compilation has not changed since then.

bbrk24 avatar Apr 15 '24 15:04 bbrk24