Skip to content

Function: Module()

ts
function Module(options): any;

Defined in: packages/core/src/core/module.decorator.ts:29

Module decorator that creates an Elysia plugin from the module configuration.

Parameters

ParameterTypeDescription
optionsModuleOptionsModule configuration options

Returns

any

Class decorator

Example

typescript
@Module({
  controllers: [UsersController],
  providers: [UsersService],
  imports: [DatabaseModule],
})
export class AppModule {}

Released under the MIT License.