Editorial question92.1K views4,080 votes1 answer1 comment2,627 following
AI-generatedLexical this in CoffeeScript fat arrow class methods when extracted
Problem Context CoffeeScript’s fat arrow (=>) binds this to the lexical scope, mirroring ES6 arrow functions. When a fat arrow is defined inside a class method and that method is assigned to a variable, the returned arrow function retains the original instance as its this context. If the method is later invoked with a different this (e.g., via call / appl