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.

Feedback for ES decorator proposal

See original GitHub issue

I’ve been contacted by @wycats (who is the champion of the ES decorator proposal at TC39) to provide feedback for the proposal from framework authors’ perspective, and since this library (and vue-property-decorators) is the primary use case where Vue leverages decorators, I’m hosting the thread here.

I know there are a few discrepancies between ES and TS decorators, but am not 100% clear on the details. Ideally, I hope we can use vue-class-component and vue-property-decorators in both ES and TS contexts.

Would appreciate thoughts from @ktsn and @kaorun343 on this topic.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
ArmorDarkscommented, Sep 29, 2018

Afraid to sound stupid, but after almost two years I’m still not getting the real value of decorators.

I must agree with @carlsmith https://github.com/coffeescript6/discuss/issues/9#issuecomment-235975114 that decorators are just a fancier way to write wrappers.

And it even doesn’t look natural in JavaScript, since it would be the only operator (probably, alongside the case 'value': operator), which breaking a regular JS premise to define strict scopes with {}.

It just looks ripped off from Python and alienly slapped on syntax with quite different philisophy.

In worst scenario it should be something like

@Component() {
  Class Test {
    // ....
  }
}
7reactions
DanielRosenwassercommented, Feb 20, 2018

Yes, we intend to align once the proposal stabilizes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Decorators details
Decorators are a proposal for extending JavaScript classes which is widely adopted among developers in transpiler environments, with broad interest in ...
Read more >
Exploring EcmaScript Decorators
Yehuda's decorators proposal seeks to enable annotating and modifying JavaScript classes, properties and object literals at design time while keeping a syntax ...
Read more >
babel/plugin-proposal-decorators
npm install --save-dev @babel/plugin-proposal-decorators ... This option was added to help tc39 collect feedback from the community by allowing ...
Read more >
Decorators make it to stage 3 : r/javascript - Reddit
97 votes, 42 comments. ... 42 comments sorted by Best ... This proposal would make them officially part of the ECMAscript spec.
Read more >
JavaScript metaprogramming with the 2022-03 decorators API
[2022-10-18] dev, javascript, es proposal. (Ad, please don't block). JavaScript decorators ... 2014-04-10: Decorators were proposed to TC39 by Yehuda Katz.
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