IT lexicon › Programming › Decorator

Decorator

Programming På svenska → Updated: 2026-05-23

A function or annotation that wraps another function/class to add behaviour.

Python: @cache, @app.route('/'). TypeScript: @Injectable(). Classic uses: logging, authentication, caching, validation. Magical but sometimes hard to debug (what's actually happening?).

← Back to the lexicon