#decorators

[ follow ]
Realpython
5 months ago
JavaScript

Primer on Python Decorators - Real Python

Functions in Python can have side effects and return values based on given arguments.
Functions in Python can be treated as first-class objects, meaning they can be passed as arguments and used like any other object. [ more ]
InfoWorld
5 months ago
Node JS

Deno adds API for date and time operations

Deno 1.40 has been released, featuring a Temporal API for advanced date and time operations.
Deno now supports the ECMAScript decorator syntax and additional features such as import.meta and improved diagnostics. [ more ]
Daniel Roy Greenfeld
6 months ago
Python

TIL: Writing decorators for classes

Decorators for classes in Python are easier to write than for functions
A decorator can be used to add additional methods to a class [ more ]
Medium
8 months ago
JavaScript

Using TypeScript Decorators in Practise

TypeScript introduces decorators in the 5.0 update, allowing developers to apply logic to classes and their properties, methods, or parameters at design time.
TypeScript decorators have extensive decoration capabilities, legacy support for parameter decoration, and robust type checking.
Decorators can be used to enhance or modify the behavior of classes, methods, properties, accessors, and parameters. [ more ]
[ Load more ]