honestjs
Version:
HonestJS - a modern web framework built on top of Hono
42 lines (41 loc) • 2.26 kB
TypeScript
/**
* Decorator that binds the request body to a parameter
* @param data - Optional property name to extract from the body
*/
export declare const Body: (data?: any) => (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
/**
* Decorator that binds a route parameter to a parameter
* @param data - The parameter name in the route
*/
export declare const Param: (data?: any) => (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
/**
* Decorator that binds a query parameter to a parameter
* @param data - The query parameter name
*/
export declare const Query: (data?: any) => (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
/**
* Decorator that binds a header value to a parameter
* @param data - The header name
*/
export declare const Header: (data?: any) => (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
/**
* Decorator that binds the request object to a parameter
*/
export declare const Req: (data?: any) => (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
export declare const Request: (data?: any) => (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
/**
* Decorator that binds the response object to a parameter
*/
export declare const Res: (data?: any) => (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
export declare const Response: (data?: any) => (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
/**
* Decorator that binds the context object to a parameter
*/
export declare const Ctx: (data?: any) => (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
export declare const Context: (data?: any) => (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
/**
* Decorator that binds a context variable to a parameter
* @param data - The variable name to retrieve from context
*/
export declare const Var: (data?: any) => (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
export declare const Variable: (data?: any) => (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;