UNPKG

dinoloop-es8

Version:

A lightweight REST API Library for building scalable Node.js server-side applications powered by Typescript

46 lines (45 loc) 1.83 kB
import { IControllerAttribute, IParseHandler } from '../types'; export declare abstract class AttributeMetadata { /** * @Throws InvalidRouteException */ private static defineHttpVerbMetadata(route, verb, target, property); /** * @Throws InvalidArgumentException */ static parse: (cb: IParseHandler, data: any, isQueryParam: boolean) => (target: any, propertyKey: string, parameterIndex: number) => void; static sendsResponse: () => (target: any, propertyKey: string) => void; static asyncAttr: () => (target: any, propertyKey: string) => void; /** * @Throws InvalidRouteException */ static httpGet: (route: string | RegExp) => (target: any, propertyKey: string) => void; /** * @Throws InvalidRouteException */ static httpPost: (route: string | RegExp) => (target: any, propertyKey: string) => void; /** * @Throws InvalidRouteException */ static httpDelete: (route: string | RegExp) => (target: any, propertyKey: string) => void; /** * @Throws InvalidRouteException */ static httpPatch: (route: string | RegExp) => (target: any, propertyKey: string) => void; /** * @Throws InvalidRouteException */ static httpPut: (route: string | RegExp) => (target: any, propertyKey: string) => void; /** * @Throws InvalidRouteException */ static httpHead: (route: string | RegExp) => (target: any, propertyKey: string) => void; /** * @Throws InvalidRouteException */ static httpAll: (route: string | RegExp) => (target: any, propertyKey: string) => void; /** * @Throws InvalidRouteException */ static controller: (prefix: string, attr?: IControllerAttribute) => (target: any, propertyKey: string) => void; }