3 ms·
The decorators proposal has been stalled out for years! It's actually a bit scary as Typescript forged forward with the original proposal (Angular, NestJS apps
by nobleach 5y ago
The decorators proposal has been stalled out for years! It's actually a bit scary as Typescript forged forward with the original proposal (Angular, NestJS apps have almost cemented these in many prod apps). So there stands to be a lot of breakage if the newer proposal is adopted. I'm sure there'll be codemods, but this is what happens...
- k__ 5y agoI never understood why JS needs decorators. It has pretty flexible function syntax already, so decorators wouldn't clean nearly as much code up as pipes would.
- nobleach 5y agoRight, and it definitely wasn't a comparison between the two proposals. I love OCaml/F#... and Elixir. So the pipes are cool with me. I've never tried the Hack variant however. As far as decorators as a "need". You're right. It's often as easy as `functionName(...args)(target)`. The decorators are definitely convenient for those coming from other languages that have annotations though.