routing-controllers
Version:
Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage for Express / Koa using TypeScript.
31 lines (30 loc) • 1.05 kB
TypeScript
import { MiddlewareMetadataArgs } from './args/MiddlewareMetadataArgs';
import { ExpressMiddlewareInterface } from '../driver/express/ExpressMiddlewareInterface';
import { ExpressErrorMiddlewareInterface } from '../driver/express/ExpressErrorMiddlewareInterface';
import { KoaMiddlewareInterface } from '../driver/koa/KoaMiddlewareInterface';
/**
* Middleware metadata.
*/
export declare class MiddlewareMetadata {
/**
* Indicates if this middleware is global, thous applied to all routes.
*/
global: boolean;
/**
* Object class of the middleware class.
*/
target: Function;
/**
* Execution priority of the middleware.
*/
priority: number;
/**
* Indicates if middleware must be executed after routing action is executed.
*/
type: 'before' | 'after';
constructor(args: MiddlewareMetadataArgs);
/**
* Gets middleware instance from the container.
*/
get instance(): ExpressMiddlewareInterface | KoaMiddlewareInterface | ExpressErrorMiddlewareInterface;
}