@nova-ts/core
Version:
A serverside framework used to build scalable application
19 lines (17 loc) • 529 B
TypeScript
/**
* Decorator to bind a method parameter to a path variable from the request URL.
*
* Example usage:
* ```ts
* @GetMapping('/user/{id}')
* getUser(@PathVariable('id') userId: string) {
* // userId will be bound to req.params.id
* }
* ```
*
* @param {string} name - The name of the path variable to extract from the request URL.
* @returns {ParameterDecorator} The parameter decorator function.
* @author Inbanithi107
*/
declare function PathVariable(name: string): ParameterDecorator;
export { PathVariable };