I have a typescript project that is using Mocha to generate coverage. I would like to convert the coverage back to the typescript files using remap-istanbul
, however I keep on getting this error when I try to run remap-istanbul on my coverage:
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
I've googled the issue and the two options I've found are either changing the compliation to "ES5" rather than "ES6" (which I cannot do as my tests will fail if I change it to ES5) or adding "use strict";
inside the block of code (which I cannot do because it is not my project).
Are there any other ways of getting around this issue?