"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InjectType = void 0;
/**
* Interface for classes that are middlewares.
*
* @abstract
* @classdesc The Middleware interface. This is an interface and can't be instantiated.
* @class ~Middleware
* @hideconstructor
* @memberof module:Injector
*/
/**
* The middleware function.
*
* @public
* @method ~Middleware.middleware
* @memberof module:Injector
*
* @param {Express.Request} req Express's Request
* @param {Express.Response} res Express's Response
* @param {Express.NextFunction} next Express's Next Function
* @returns {Promise<any>}
*
* @example <caption>Example usage of [Middleware]{@link module:Injector~Middleware}.</caption>
* [\@Inject]{@link Inject}
* export default class AuthenticationMiddleware implements [Middleware]{@link module:Injector~Middleware} {
* public async [middleware]{@link module:Injector~Middleware.middleware}(
* req: Request,
* res: Response,
* next: NextFunction
* ): Promise<any> {
* (req as any).myData = 'My custom request data!';
* return next();
* }
* }
*/
/**
* Interface for classes that are entities.
*
* @class ~InjectedEntity
* @hideconstructor
* @abstract
* @classdesc The InjectedEntity interface. This is an interface and can't be instantiated.
* @memberof module:Injector
*/
/**
* This function is triggered when the entity is loaded. Function is Async
*
* @public
* @method ~InjectedEntity.onLoad
* @memberof module:Injector
*
* @returns {Promise<void>}
*
* @example <caption>Example usage of [InjectedEntity]{@link module:Injector~InjectedEntity}.</caption>
* [\@Inject]{@link Inject}
* [\@Entity]{@link Entity}('Name')
* export default class ClassName implements [InjectedEntity]{@link module:Injector~InjectedEntity} {
* public async [onLoad]{@link module:Injector~InjectedEntity.onLoad}(): Promise<void> {
*
* }
* }
*/
/**
* Interface for classes that are injected.
*
* @class ~InjectedClass
* @hideconstructor
* @abstract
* @classdesc The InjectedClass interface. This is an interface and can't be instantiated.
* @memberof module:Injector
*/
/**
* This function is triggered when Injector.ready() is called. Function is Async
*
* @public
* @method ~InjectedClass.onReady
* @memberof module:Injector
*
* @returns {Promise<void>}
*
* @example <caption>Example usage of [InjectedClass]{@link module:Injector~InjectedClass}.</caption>
* [\@Inject]{@link Inject}
* export default class ClassName implements [InjectedClass]{@link module:Injector~InjectedClass} {
* public async [onReady]{@link module:Injector~InjectedClass.onReady}(): Promise<void> {
*
* }
* }
*/
/**
* @static
* @type {InjectType}
* @memberof module:Injector
*
* @property {number} Class The Class type. Injects the class.
* @property {number} Function The Function type. Injects the function.
* @property {number} FunctionResult The FunctionResult type. Injects the function's result.
* @property {number} Variable The Variable type. Injects the variable.
* @property {number} Middleware The Middleware type. Injects the middleware as a Class
*/
var InjectType;
(function (InjectType) {
InjectType[InjectType["Class"] = 0] = "Class";
InjectType[InjectType["Function"] = 1] = "Function";
InjectType[InjectType["FunctionResult"] = 2] = "FunctionResult";
InjectType[InjectType["Variable"] = 3] = "Variable";
InjectType[InjectType["Middleware"] = 4] = "Middleware";
})(InjectType = exports.InjectType || (exports.InjectType = {}));
//# sourceMappingURL=Injector.js.map