Core Enums & Interfaces
A list of TypeScript enums and interfaces you can use when working with the Injex framework and its Plugins. This page is used as the appendix for some pages in these docs.
Enums
LogLevel
import { LogLevel } from "@injex/core";
enum LogLevel {
Error = 0,
Warn = 1,
Info = 2,
Debug = 3
}
Interfaces
IBootstrap
import { IBootstrap } from "@injex/core";
export interface IBootstrap {
run(): Promise<void> | void;
didCatch?(e: Error): void;
}
ILazyModule
import { ILazyModule } from "@injex/core";
export interface ILazyModule<T> {
import(...args: any[]): Promise<IConstructor<T>>;
}
IInjexPlugin
import { IInjexPlugin } from "@injex/core";
export interface IInjexPlugin<T extends IContainerConfig = any> {
apply(container: Injex<T>): void | Promise<void>;
}
IMiddleware
import { IMiddleware } from "@injex/express-plugin";
export interface IMiddleware extends IConstructor {
handle(req: Express.Request, res: Express.Response, next: NextFunction): void;
}