Skip to main content

Function: Injectable()

Injectable(options?): ClassDecorator

Class decorator that marks a class as injectable into the Aurora DI container. You can optionally specify the provider scope:

  • Scope.SINGLETON (default): one shared instance per application.
  • Scope.TRANSIENT: a new instance for each injection.

Parameters

options?

InjectableOptions

Optional configuration for this injectable provider.

Returns

ClassDecorator

Throws

If the decorator is applied more than once on the same class.