Solving this issue is a pretty big priority for us since we use Coffeescript classes a lot in our codebase. As described in the issue above, none of the workarounds work in our case so scanning the full body of the function for "ngInject" seems to be the only option.
matchPrologueDirectives will now scan the whole body of the function instead of breaking after the first token.
The performance impact is minimal. I ran the performance test a thousand times and compared to the old version and it was slower by up to 2%.
If this is not acceptable, I could put it behind a flag, such as --fullscan.
This solves issue#152
Solving this issue is a pretty big priority for us since we use Coffeescript classes a lot in our codebase. As described in the issue above, none of the workarounds work in our case so scanning the full body of the function for "ngInject" seems to be the only option.
matchPrologueDirectives will now scan the whole body of the function instead of breaking after the first token. The performance impact is minimal. I ran the performance test a thousand times and compared to the old version and it was slower by up to 2%.
If this is not acceptable, I could put it behind a flag, such as --fullscan.