question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't understand decorators

See original GitHub issue

I just got this error from the Atom package:

SyntaxError: Unexpected token @ (9:0)
   7 | import formousOptions from './theme-form-fields';
   8 | 
>  9 | @Formous(formousOptions)
     | ^
  10 | @Radium
  11 | class ThemeForm extends Component {
  12 |   constructor(props) {

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

4reactions
vjeuxcommented, Mar 1, 2017

Closing as we’re not going to support this in the flow parser. You should use babylon parser if you want to use decorators.

2reactions
hawkrivescommented, Aug 12, 2017

@fiber-god Babylon also understands flow types, so you should be fine to use it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I still don't entirely understand decorators in TypeScript? - Reddit
I guess it just adds a call to the decorator function after the class declaration and passes in the constructor for you. Is...
Read more >
Q: How can I make a chain of function decorators in Python?
To understand decorators, you must first understand that functions are objects in Python. This has important consequences. Let's see why with a simple ......
Read more >
Finally understanding decorators in Python - Pierre Ouannes
The best way to understand decorators is to understand what problem they solve. Bear with me, we'll get to decorators at the end...
Read more >
Understanding Decorators - SurviveJS
Decorators are syntactic sugar that allow us to wrap and annotate classes and functions. In their current proposal (stage 1) only class and...
Read more >
Six levels of decorators from beginner to expert | by Mike Huls
After this article you have a clear understanding how decorators work, ... Notice that our function is pretty simple; it doesn't even return ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found