Closed MartijnWelker closed 3 years ago
Currently inspectDeclarator only checks for (arrow)function expressions, but it should also check for class expressions in the form of:
inspectDeclarator
/*@ngInject*/ let MyClass = class MyClass { // or as unnamed class constructor (myService) { } };
and
let MyClass = class MyClass { // or as unnamed class /*@ngInject*/ constructor (myService) { } };
If you enter the above code in the testpage WITHOUT compiling to ES5 the injection tokens won't be added.
Damned, I did the same https://github.com/schmod/babel-plugin-angularjs-annotate/pull/55 but also added a test case
Closing in favour of #55
Currently
inspectDeclarator
only checks for (arrow)function expressions, but it should also check for class expressions in the form of:and
If you enter the above code in the testpage WITHOUT compiling to ES5 the injection tokens won't be added.