@foal/core
Version:
Full-featured Node.js framework, with no complexity
70 lines (69 loc) • 2.29 kB
TypeScript
import 'reflect-metadata';
/**
* HTTP methods available.
*/
export type HttpMethod = 'ALL' | 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
/**
* Decorator specifying that a controller method handles requests matching all HTTP verbs.
*
* @export
* @param {string} [path] - The path of the request.
* @returns The decorator.
*/
export declare function All(path?: string): (target: any, propertyKey: string) => void;
/**
* Decorator specifying that a controller method handles HEAD requests.
*
* @export
* @param {string} [path] - The path of the request.
* @returns The decorator.
*/
export declare function Head(path?: string): (target: any, propertyKey: string) => void;
/**
* Decorator specifying that a controller method handles OPTIONS requests.
*
* @export
* @param {string} [path] - The path of the request.
* @returns The decorator.
*/
export declare function Options(path?: string): (target: any, propertyKey: string) => void;
/**
* Decorator specifying that a controller method handles GET requests.
*
* @export
* @param {string} [path] - The path of the request.
* @returns The decorator.
*/
export declare function Get(path?: string): (target: any, propertyKey: string) => void;
/**
* Decorator specifying that a controller method handles POST requests.
*
* @export
* @param {string} [path] - The path of the request.
* @returns The decorator.
*/
export declare function Post(path?: string): (target: any, propertyKey: string) => void;
/**
* Decorator specifying that a controller method handles PUT requests.
*
* @export
* @param {string} [path] - The path of the request.
* @returns The decorator.
*/
export declare function Put(path?: string): (target: any, propertyKey: string) => void;
/**
* Decorator specifying that a controller method handles PATCH requests.
*
* @export
* @param {string} [path] - The path of the request.
* @returns The decorator.
*/
export declare function Patch(path?: string): (target: any, propertyKey: string) => void;
/**
* Decorator specifying that a controller method handles DELETE requests.
*
* @export
* @param {string} [path] - The path of the request.
* @returns The decorator.
*/
export declare function Delete(path?: string): (target: any, propertyKey: string) => void;