UNPKG

@d3vtool/ex-frame

Version:

This library enhances Express.js by providing a more organized structure for web API projects, along with improved control and error handling capabilities.

17 lines (16 loc) 2.19 kB
import { type RequestHandler } from "express"; export type TConstructor = new () => {}; export type ExRoutePath = `/${string}`; export declare const Get: (route: ExRoutePath) => (_targetFn: RequestHandler | TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void; export declare const Post: (route: ExRoutePath) => (_targetFn: RequestHandler | TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void; export declare const Put: (route: ExRoutePath) => (_targetFn: RequestHandler | TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void; export declare const Delete: (route: ExRoutePath) => (_targetFn: RequestHandler | TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void; export declare const Patch: (route: ExRoutePath) => (_targetFn: RequestHandler | TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void; export declare const Head: (route: ExRoutePath) => (_targetFn: RequestHandler | TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void; export declare const Options: (route: ExRoutePath) => (_targetFn: RequestHandler | TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void; export declare const Trace: (route: ExRoutePath) => (_targetFn: RequestHandler | TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void; export declare const Connect: (route: ExRoutePath) => (_targetFn: RequestHandler | TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void; export declare const Link: (route: ExRoutePath) => (_targetFn: RequestHandler | TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void; export declare const Unlink: (route: ExRoutePath) => (_targetFn: RequestHandler | TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void; export declare const All: (route: ExRoutePath) => (_targetFn: RequestHandler | TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void; export declare function ParentRoute(route: ExRoutePath): (targetFn: TConstructor, _propertyKey?: string, descriptor?: PropertyDescriptor) => void;