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.

Implement class property decorators

See original GitHub issue

At the moment babel-plugin-flow-runtime generates decorators for typed class properties, but t.decorate() is not actually implemented yet. Need to implement it in a way that does not confound e.g. mobx

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
phpnodecommented, Mar 16, 2017

@gajus looks like you need to add babel-plugin-transform-decorators-legacy to your list of plugins.

We currently have to use decorator syntax for this transform just in case the user themselves is using decorators, it would be nicer if we detected their presence and fell back to something that didn’t depend on them.

0reactions
gajuscommented, Jun 13, 2017

No worries, I know the feeling.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Property Decorator - TutorialsTeacher
The @property decorator is a built-in decorator in Python for the property() function. Use @property decorator on any method in the class to...
Read more >
Documentation - Decorators - TypeScript
A Decorator is a special kind of declaration that can be attached to a class declaration, method, accessor, property, or parameter. Decorators use...
Read more >
Python Property Decorator - GeeksforGeeks
A decorator feature in Python wraps in a function, appends several functionalities to existing code and then returns it.
Read more >
Python @property Decorator (With Examples) - Programiz
In this tutorial, you will learn about Python @property decorator; a pythonic way to use getters and setters in object-oriented programming.
Read more >
Start Implementing Your Own Typescript Property Decorators
A property decorator can only be used to observe that a property of a specific name has been declared for a class. A...
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