Skip to main content
Version: 2.16.2

Decorators

Decorators are a feature of TypeScript and are used to extend the functionality of a class or method adding metadata to them. ExpressoTS uses decorators to refine the user experience and make the code more readable and maintainable.

List of decorators

Here is a complete list of all decorators available in ExpressoTS as well as a brief description of what they do.

Class Decorators

Decorators available for your classes.

DecoratorDescription
@provideBinds a class to a dependency injection container as RequestScope.
@provideSingletonBinds a class to a dependency injection container as Singleton.
@provideTransientBinds a class to a dependency injection container as Transient.
@injectableMarks a class as available to be injected.
@injectMarks a class as available to be injected in the constructor of another class.
info

In a future release, we will add the capability to create custom decorators.


Support us ❤️

ExpressoTS is an MIT-licensed open source project. It's an independent project with ongoing development made possible thanks to your support. If you'd like to help, please read our support guide.