UNPKG

@nova-ts/core

Version:

A serverside framework used to build scalable application

25 lines (23 loc) 653 B
/** * Decorator to bind a method parameter to a query parameter from the HTTP request. * * Useful for extracting values from the URL like `/search?term=abc&page=2`. * * Example usage: * ```ts * @GetMapping('/search') * search( * @RequestParam('term') term: string, * @RequestParam('page') page: number * ) { * // term = req.query.term * // page = req.query.page * } * ``` * * @param {string} name - The name of the query parameter to extract. * @returns {ParameterDecorator} The parameter decorator function. * @author Inbanithi107 */ declare function RequestParam(key: string): ParameterDecorator; export { RequestParam };