How about killing two birds with one stone? The @@directive
decorator takes any string literal and outputs it at the top of the generated JavaScript file. Instead, how about outputting it at the corresponding source position? Eg
// ...other stuff...
@@directive(`/** Sum two numbers */`)
let sum = (x, y) => x + y