typenexus
Version:
TypeNexus is a good tool for API encapsulation and management. It provides a clean and lightweight way to package TypeORM functionality, helping you build applications faster while reducing template code redundancy and type conversion work.
34 lines (33 loc) • 946 B
JavaScript
/**
* "Use middleware" metadata.
*/
export class UseMetadata {
// -------------------------------------------------------------------------
// Properties
// -------------------------------------------------------------------------
/**
* Object class of the middleware class.
*/
target;
/**
* Method used by this "use".
*/
method;
/**
* Middleware to be executed by this "use".
*/
middleware;
/**
* Indicates if middleware must be executed after routing action is executed.
*/
afterAction;
// -------------------------------------------------------------------------
// Constructor
// -------------------------------------------------------------------------
constructor(args) {
this.target = args.target;
this.method = args.method;
this.middleware = args.middleware;
this.afterAction = args.afterAction;
}
}