Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
simlevesque
on Nov 27, 2022
|
parent
|
context
|
favorite
| on:
Show HN: Yet Another Node.js Framework
Yeah, decorators were a mistake. I don't want any in my code or my dependencies.
popotamonga
on Nov 27, 2022
[–]
Why does it need the use if its already a parameter?
eurasiantiger
on Nov 27, 2022
|
parent
|
next
[–]
It’s a dependency injection pattern. The decorator is telling some other piece of code what to pass in to that method, or to set some hidden context.
I’d check the docs for what it specifically does, but the site is completely unusable on iOS.
rswskg
on Nov 28, 2022
|
parent
|
prev
[–]
It would make more sense if the injected variable was an interface, the decorator telling you what the concencrete type should be. I think? Otherwise, yeah totally pointless.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: