# UseParam Decorator operation input pipe
Module | import { UseParam } from "@tsed/common" |
---|---|
Source | /packages/common/src/mvc/decorators/params/useParam.ts |
# Overview
function UseParam(paramType: ParamTypes | string, options?: IParamOptions<any>): ParameterDecorator;
# Description
Register a new param. It use the paramType to extract value and give it to the next pipe.
Given options allow to enable or disable following pipes:
- useType: Add extra type for the json mapper,
- expression: Get property from the returned value by the previous pipe.
- useValidation: Apply validation from the returned value by the previous pipe.
- useConverter: Apply json mapper from the returned value by the previous pipe.
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Jest
- Seq
- Controllers
- Providers
- Model
- Converters
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing