@slowvoid.dev/express
Version:
node decorators - decorators for express library
42 lines (41 loc) • 1.48 kB
TypeScript
import { Middleware } from '../middleware';
/**
* All routes
*
* Special-cased "all" method, applying the given route `path`,
* middleware, and callback to _every_ HTTP method.
*/
export declare function All(url: string, middleware?: Middleware[]): (target: object, key: string, descriptor: any) => any;
/**
* Get route
*/
export declare function Get(url: string, middleware?: Middleware[]): (target: object, key: string, descriptor: any) => any;
/**
* Post route
*/
export declare function Post(url: string, middleware?: Middleware[]): (target: object, key: string, descriptor: any) => any;
/**
* Put route
*/
export declare function Put(url: string, middleware?: Middleware[]): (target: object, key: string, descriptor: any) => any;
/**
* Delete route
*/
export declare function Delete(url: string, middleware?: Middleware[]): (target: object, key: string, descriptor: any) => any;
/**
* Patch route
*/
export declare function Patch(url: string, middleware?: Middleware[]): (target: object, key: string, descriptor: any) => any;
/**
* Options route
*/
export declare function Options(url: string, middleware?: Middleware[]): (target: object, key: string, descriptor: any) => any;
/**
* Head route
*
*/
export declare function Head(url: string, middleware?: Middleware[]): (target: object, key: string, descriptor: any) => any;
/**
* Method status
*/
export declare function Status(status: number): (target: object, key: string, descriptor: any) => any;