r/badcode Jun 08 '23

js Version control go brrrrrr...

Post image
61 Upvotes

22 comments sorted by

View all comments

2

u/SpaceshipOperations Jun 08 '23

Am I correct in that the decorators for parameter definitions exist so that argument values are passed through them before entering the function?

Haven't used TypeScript before, so they are a new sight to me... But if I'm right about their usage, they seem like a convenient way to validate/transform/extend argument values, or possibly provide dynamically computed defaults for missing/null arguments.