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

Method syntax not being annotated #9

Open
marcioj opened this issue Jun 21, 2016 · 1 comment
Open

Method syntax not being annotated #9

marcioj opened this issue Jun 21, 2016 · 1 comment

Comments

@marcioj
Copy link
Owner

marcioj commented Jun 21, 2016

The following works:

$stateProvider
  .state('dashboard', {
    url: '/dashboard',
    onEnter: (productivityData) => {}
})

but this doesn't

$stateProvider
  .state('dashboard', {
    url: '/dashboard',
    onEnter(productivityData) {}
})
@EladBezalel
Copy link

This happens because of how the annotation is injected, it tries to annotate a not existing function,
The method is of type objectMethod while the first example is objectProperty I ended up copying babel-plugin-transform-es2015-shorthand-properties method function which transforms the method into property and than annotation just works

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

No branches or pull requests

2 participants