jashkenas/coffeescript

Comment gets lost inside a function when using an existential operator

STRd6 opened this issue · 1 comments

STRd6 commented
->
  #@ts-ignore
  subsystem.clearCache?()

Actual

// Generated by CoffeeScript 2.6.1
(function() {
  return typeof subsystem.clearCache === "function" ? subsystem.clearCache() : void 0;
});

Expected

// Generated by CoffeeScript 2.6.1
(function() {
  //@ts-ignore
  return typeof subsystem.clearCache === "function" ? subsystem.clearCache() : void 0;
});

If you’d like to tackle this, #5366 (comment) has some links to get you started. I also see that issue, about outputting JSDoc comments properly, as a high priority.