# ParamMetadata Class
Module | import { ParamMetadata } from "@tsed/common" |
---|---|
Source | /packages/common/src/mvc/models/ParamMetadata.ts |
# Overview
class ParamMetadata extends Storable implements IParamConstructorOptions {
/**
* Allowed value when the entity is required.
* @type {Array}
*/
allowedRequiredValues: any[];
/**
* Required entity.
*/
required: boolean;
/**
*
*/
expression: string;
/**
*
*/
paramType: string | ParamTypes;
pipes: Type<IPipe>[];
filter?: Type<IFilter>;
constructor(options: IParamConstructorOptions);
get service(): string | Type<any> | ParamTypes;
set service(service: string | Type<any> | ParamTypes);
static get(target: Type<any>, propertyKey: string | symbol, index: number): ParamMetadata;
static has(target: Type<any>, propertyKey: string | symbol, index: number): boolean;
static set(target: Type<any>, propertyKey: string | symbol, index: number, paramMetadata: ParamMetadata): void;
static getParams(target: Type<any>, propertyKey: string | symbol): ParamMetadata[];
/**
* Check precondition between value, required and allowedRequiredValues to know if the entity is required.
* @param value
* @returns {boolean}
*/
isRequired(value: any): boolean;
}
# Members
allowedRequiredValues: any[];
Allowed value when the entity is required.
required: boolean;
Required entity.
expression: string;
paramType: string | ParamTypes;
get service(): string | Type<any> | ParamTypes;
set service(service: string | Type<any> | ParamTypes);
static get(target: Type<any>, propertyKey: string | symbol, index: number): ParamMetadata;
static has(target: Type<any>, propertyKey: string | symbol, index: number): boolean;
static set(target: Type<any>, propertyKey: string | symbol, index: number, paramMetadata: ParamMetadata): void;
static getParams(target: Type<any>, propertyKey: string | symbol): ParamMetadata[];
isRequired(value: any): boolean;
Check precondition between value, required and allowedRequiredValues to know if the entity is required.
- 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