index
Classes
| Class | Description |
|---|---|
| BadRequestException | Exception for 400 Bad Request errors |
| ConfigurableModuleBuilder | Factory that lets you create configurable modules and provides a way to reduce the majority of dynamic module boilerplate. |
| ConsoleLogger | - |
| Container | - |
| DIError | Error thrown when the DI container cannot resolve a dependency. |
| EventEmitter | Event emitter for dispatching and handling events |
| FileValidationError | - |
| ForbiddenException | Exception for 403 Forbidden errors |
| HttpAdapterHost | Host class for accessing the HTTP adapter. Used to abstract the underlying HTTP server. |
| HttpException | Base class for HTTP exceptions |
| Injector | - |
| InstanceWrapper | - |
| InternalServerErrorException | Exception for 500 Internal Server Error errors |
| LifecycleManager | Class to manage lifecycle hooks across the application |
| Logger | - |
| ModuleRef | ModuleRef provides a way to access providers within a module. It is automatically injected by the framework and allows retrieving providers dynamically at runtime. |
| NotFoundException | Exception for 404 Not Found errors |
| Reflector | Helper class for retrieving metadata from classes and methods using reflect-metadata. |
| StreamableFile | Streamable file class for handling file streams |
| UnauthorizedException | Exception for 401 Unauthorized errors |
Functions
| Function | Description |
|---|---|
| addGlobalExceptionFilter | - |
| applyDecorators | Applies multiple decorators to a target (class, method, or property). Useful for composing multiple decorators into a single one. |
| Catch | Decorator that marks a class as an exception filter. The decorated class must implement the ExceptionFilter interface. |
| Controller | Controller decorator that defines a controller with a route prefix. |
| Cookies | - |
| createClassMetadataCache | Lazily-populated WeakMap cache for class-level Reflect metadata. Automatically garbage-collects entries when the class is collected. |
| createElysiaApplication | Creates an Elysia-Nest application with microservices support. |
| createElysiaPlugin | Helper function to create the Elysia plugin from module metadata. |
| createLoggerOptionsProvider | Factory to create logger options provider with custom options |
| createMetadataCache | Lazily-populated cache for generic Reflect metadata keyed by (target, metadataKey). Two-level lookup: WeakMap<object, Map<key, T>>. |
| createMethodMetadataCache | Lazily-populated cache for method-level Reflect metadata. Two-level lookup: WeakMap<object, Map<string |
| createParamDecorator | - |
| EventSubscriber | Decorator to mark a class as an event subscriber |
| forwardRef | - |
| getCatchExceptionsMetadata | Get the exception types that a filter catches |
| getElysiaHooksMetadata | Get all Elysia lifecycle hooks metadata for a controller |
| getEventEmitter | Get the global event emitter instance |
| getLifecycleManager | Get the global lifecycle manager instance |
| Global | Marks a module as global, meaning its providers can be accessed from any other module without explicitly importing it. |
| Header | Decorator that sets HTTP headers for the response. |
| Headers | - |
| HttpCode | Decorator that sets the HTTP status code for the response. |
| Inject | - |
| Injectable | - |
| isCatchFilter | Check if a class is marked as an exception filter |
| isClassMiddleware | - |
| isClassProvider | - |
| isCustomProvider | - |
| isExistingProvider | - |
| isFactoryProvider | - |
| isForwardRef | - |
| isFunction | Check if value is a function |
| isLogLevelEnabled | - |
| isNil | Check if value is nil (null or undefined) |
| isObject | Check if value is an object |
| isString | Check if value is a string |
| isTypeProvider | - |
| isUndefined | Check if value is undefined |
| isValidationError | - |
| isValueProvider | - |
| Middleware | Marks a class as middleware. Implies @Injectable(). |
| Module | Module decorator that creates an Elysia plugin from the module configuration. |
| OnClose | Marks a gateway method as the WebSocket close handler. Called when a client disconnects. |
| OnEvent | Decorator to mark a method as an event handler |
| OnMessage | Marks a gateway method as the WebSocket message handler. Called when a message is received from a client. |
| OnOpen | Marks a gateway method as the WebSocket open handler. Called when a client establishes a connection. |
| Optional | - |
| parseValidationError | - |
| processParameters | Extract and validate parameters based on metadata |
| registerEventHandlers | Function to register event handlers from a class instance |
| Schema | - |
| SetMetadata | Decorator that assigns metadata to the class using the specified key. |
| UseGuards | Decorator that binds guards to the scope of the controller or method, depending on its context. |
| UseInterceptors | Decorator that binds interceptors to the scope of the controller or method, depending on its context. |
| WebSocketGateway | Class decorator that marks a class as a WebSocket gateway. |
Interfaces
| Interface | Description |
|---|---|
| ApplicationOptions | - |
| BaseProvider | - |
| BeforeApplicationShutdown | Interface for lifecycle hooks called before the application is closed This method is called after all OnModuleDestroy hooks have been called |
| CallHandler | Call handler interface for interceptors |
| CanActivate | Interface for guards |
| ClassProvider | - |
| ConfigurableModuleAsyncOptions | Interface that represents the module async options object Factory method name varies depending on the "FactoryClassMethodKey" type argument. |
| ConfigurableModuleBuilderOptions | - |
| ConfigurableModuleHost | Configurable module host. See properties for more details |
| ConsoleLoggerOptions | - |
| ContextId | - |
| ControllerMetadata | Controller metadata type |
| DynamicModule | Dynamic module configuration |
| ElysiaHookMetadata | Metadata for Elysia lifecycle hooks |
| ElysiaNestMiddleware | Interface for class-based middleware. Instances will be resolved from the DI container. |
| EventHandlerRegistration | Event handler registration with metadata |
| ExceptionContext | Context for exception filters |
| ExceptionFilter | Interface for exception filters |
| ExceptionFilterMetadata | - |
| ExecutionContext | Execution context interface providing access to the request/response and handler information |
| ExistingProvider | - |
| FactoryProvider | - |
| FileValidationOptions | - |
| ForwardReference | - |
| GetOptions | Options for ModuleRef.get() method |
| HttpAdapter | Interface for HTTP adapter - abstracts HTTP server operations |
| HttpArgumentsHost | HTTP context interface for request/response access |
| IEventEmitter | Interface for event emitter |
| InjectableOptions | - |
| InstancePerContext | - |
| Interceptor | Interface for request interceptors |
| InterceptorMetadata | - |
| LoggerOptions | - |
| LoggerService | - |
| ModuleMetadata | - |
| ModuleOptions | - |
| NestInterceptor | Elysia-Nest interceptor interface |
| OnApplicationBootstrap | Interface for lifecycle hooks called when the application is bootstrapped This method is called after all modules have been initialized |
| OnApplicationShutdown | Interface for lifecycle hooks called when the application is shutting down This method is called when all connections are closed and the application is about to exit |
| OnEventOptions | Options for the OnEvent decorator |
| OnModuleDestroy | Interface for lifecycle hooks called before a module is destroyed This method is called when the application is shutting down |
| OnModuleInit | Interface for lifecycle hooks called when a module is initialized This method is called once all the modules are instantiated but before the application is fully started |
| ParamInfo | - |
| ParamMetadata | - |
| PipeMetadata | Metadata for pipes |
| PipeTransform | Interface for pipes |
| RequestContext | - |
| ResponseInterceptor | Interface for response interceptors |
| RouteMetadata | - |
| RouteSchemaOptions | - |
| RpcArgumentsHost | RPC context interface |
| ScopeOptions | - |
| Type | - |
| ValidationErrorDetails | - |
| ValueProvider | - |
| WsArgumentsHost | WebSocket context interface |
| WsGatewayMetadata | - |
| WsHandlerMetadata | - |
Type Aliases
| Type Alias | Description |
|---|---|
| ConfigurableModuleCls | Class that represents a blueprint/prototype for a configurable Nest module. This class provides static methods for constructing dynamic modules. Their names can be controlled through the "MethodKey" type argument. |
| ConfigurableModuleOptionsFactory | Interface that must be implemented by the module options factory class. Method key varies depending on the "FactoryClassMethodKey" type argument. |
| ElysiaHookName | Type for Elysia lifecycle hook names |
| ElysiaWsContext | The WebSocket context object passed to gateway handler methods. Wraps Elysia's ElysiaWS with an untyped data payload for general use. |
| EventHandler | Event handler function type |
| FunctionalMiddleware | Functional middleware type. Directly an Elysia handler or a similar function. |
| - | |
| InjectionToken | - |
| LogLevel | - |
| MiddlewareType | Represents either a class type that implements ElysiaNestMiddleware or a functional middleware. |
| OptionalFactoryDependency | - |
| Provider | - |
| ProviderToken | - |
| TypeProvider | - |
| WsHandlerType | - |
Enumerations
| Enumeration | Description |
|---|---|
| HttpStatus | Standard HTTP status codes. |
| Scope | - |