# Decorator UseParam

Decorator operation input pipe private
Module
import { UseParam } from "@tsed/platform/platform-params/src/decorators/useParam"
Source/packages/platform/platform-params/src/decorators/useParam.ts

# Overview

function UseParam(options: Partial<ParamOptions>): ParameterDecorator;

export function UseParam(paramType: string, options?: Partial<ParamOptions>): 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.

Other topics