Editorial question92.1K views1,492 votes0 answers2,876 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