Function: Module()
Module(
metadata
):ClassDecorator
Class decorator that designates a class as a module in the Aurora framework. A module groups related controllers, providers, and imported/exported modules into a cohesive unit for dependency scanning and resolution.
Parameters
metadata
Configuration object defining:
imports
: other modules whose providers/controllers should be availablecontrollers
: controller classes to instantiate and bindproviders
: service classes or tokens to register in the DI containerexports
: subset of providers/controllers to expose to importing modules
Returns
ClassDecorator
Throws
- If applied more than once to the same class.
- If the metadata contains keys outside of the allowed set (
imports
,controllers
,providers
,exports
).