@@ -170,10 +170,64 @@ export const Headers: (
170170 property ?: string ,
171171) => ParameterDecorator = createRouteParamDecorator ( RouteParamtypes . HEADERS ) ;
172172
173+ /**
174+ * Route handler parameter decorator. Extracts the `query`
175+ * property from the `req` object and populates the decorated
176+ * parameter with the value of `query`. May also apply pipes to the bound
177+ * query parameter.
178+ *
179+ * For example:
180+ * ```typescript
181+ * async find(@Query('user') user: string)
182+ * ```
183+ *
184+ * @param property name of single property to extract from the `query` object
185+ * @param pipes one or more pipes to apply to the bound query parameter
186+ *
187+ * @see [Request object](https://docs.nestjs.com/controllers#request-object)
188+ *
189+ * @publicApi
190+ */
173191export function Query ( ) : ParameterDecorator ;
192+ /**
193+ * Route handler parameter decorator. Extracts the `query`
194+ * property from the `req` object and populates the decorated
195+ * parameter with the value of `query`. May also apply pipes to the bound
196+ * query parameter.
197+ *
198+ * For example:
199+ * ```typescript
200+ * async find(@Query('user') user: string)
201+ * ```
202+ *
203+ * @param property name of single property to extract from the `query` object
204+ * @param pipes one or more pipes to apply to the bound query parameter
205+ *
206+ * @see [Request object](https://docs.nestjs.com/controllers#request-object)
207+ *
208+ * @publicApi
209+ */
174210export function Query (
175211 ...pipes : ( Type < PipeTransform > | PipeTransform ) [ ]
176212) : ParameterDecorator ;
213+ /**
214+ * Route handler parameter decorator. Extracts the `query`
215+ * property from the `req` object and populates the decorated
216+ * parameter with the value of `query`. May also apply pipes to the bound
217+ * query parameter.
218+ *
219+ * For example:
220+ * ```typescript
221+ * async find(@Query('user') user: string)
222+ * ```
223+ *
224+ * @param property name of single property to extract from the `query` object
225+ * @param pipes one or more pipes to apply to the bound query parameter
226+ *
227+ * @see [Request object](https://docs.nestjs.com/controllers#request-object)
228+ *
229+ * @publicApi
230+ */
177231export function Query (
178232 property : string ,
179233 ...pipes : ( Type < PipeTransform > | PipeTransform ) [ ]
@@ -300,10 +354,82 @@ export function Body(
300354 ) ;
301355}
302356
357+ /**
358+ * Route handler parameter decorator. Extracts the `params`
359+ * property from the `req` object and populates the decorated
360+ * parameter with the value of `params`. May also apply pipes to the bound
361+ * parameter.
362+ *
363+ * For example, extracting all params:
364+ * ```typescript
365+ * findOne(@Param() params: string[])
366+ * ```
367+ *
368+ * For example, extracting a single param:
369+ * ```typescript
370+ * findOne(@Param('id') id: string)
371+ * ```
372+ * @param property name of single property to extract from the `req` object
373+ * @param pipes one or more pipes - either instances or classes - to apply to
374+ * the bound parameter.
375+ *
376+ * @see [Request object](https://docs.nestjs.com/controllers#request-object)
377+ * @see [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes)
378+ *
379+ * @publicApi
380+ */
303381export function Param ( ) : ParameterDecorator ;
382+ /**
383+ * Route handler parameter decorator. Extracts the `params`
384+ * property from the `req` object and populates the decorated
385+ * parameter with the value of `params`. May also apply pipes to the bound
386+ * parameter.
387+ *
388+ * For example, extracting all params:
389+ * ```typescript
390+ * findOne(@Param() params: string[])
391+ * ```
392+ *
393+ * For example, extracting a single param:
394+ * ```typescript
395+ * findOne(@Param('id') id: string)
396+ * ```
397+ * @param property name of single property to extract from the `req` object
398+ * @param pipes one or more pipes - either instances or classes - to apply to
399+ * the bound parameter.
400+ *
401+ * @see [Request object](https://docs.nestjs.com/controllers#request-object)
402+ * @see [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes)
403+ *
404+ * @publicApi
405+ */
304406export function Param (
305407 ...pipes : ( Type < PipeTransform > | PipeTransform ) [ ]
306408) : ParameterDecorator ;
409+ /**
410+ * Route handler parameter decorator. Extracts the `params`
411+ * property from the `req` object and populates the decorated
412+ * parameter with the value of `params`. May also apply pipes to the bound
413+ * parameter.
414+ *
415+ * For example, extracting all params:
416+ * ```typescript
417+ * findOne(@Param() params: string[])
418+ * ```
419+ *
420+ * For example, extracting a single param:
421+ * ```typescript
422+ * findOne(@Param('id') id: string)
423+ * ```
424+ * @param property name of single property to extract from the `req` object
425+ * @param pipes one or more pipes - either instances or classes - to apply to
426+ * the bound parameter.
427+ *
428+ * @see [Request object](https://docs.nestjs.com/controllers#request-object)
429+ * @see [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes)
430+ *
431+ * @publicApi
432+ */
307433export function Param (
308434 property : string ,
309435 ...pipes : ( Type < PipeTransform > | PipeTransform ) [ ]
0 commit comments