Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for class expressions in inspectDeclarator #54

Closed

Conversation

MartijnWelker
Copy link

@MartijnWelker MartijnWelker commented Nov 19, 2019

Currently inspectDeclarator only checks for (arrow)function expressions, but it should also check for class expressions in the form of:

/*@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.

@MartijnWelker MartijnWelker changed the title Also check for class expressions in inspectDeclarator Check for class expressions in inspectDeclarator Nov 19, 2019
@MartijnWelker MartijnWelker force-pushed the parse_class_expressions branch 7 times, most recently from b366314 to 9254767 Compare November 20, 2019 13:16
@MartijnWelker MartijnWelker force-pushed the parse_class_expressions branch from 9254767 to 373e292 Compare November 20, 2019 13:19
@timofei-iatsenko
Copy link

Damned, I did the same #55
but also added a test case

@MartijnWelker
Copy link
Author

Closing in favour of #55

@MartijnWelker MartijnWelker deleted the parse_class_expressions branch July 9, 2021 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants