typenexus
Version:
TypeNexus is a good tool for API encapsulation and management. It provides a clean and lightweight way to package TypeORM functionality, helping you build applications faster while reducing template code redundancy and type conversion work.
54 lines (53 loc) • 1.2 kB
JavaScript
/**
* Action Parameter metadata.
*/
export class ParamMetadata {
/**
* Parameter's action.
*/
actionMetadata;
/**
* Object on which's method's parameter this parameter is attached.
*/
object;
/**
* Method on which's parameter is attached.
*/
method;
/**
* Index (# number) of the parameter in the method signature.
*/
index;
/**
* Parameter type.
*/
type;
/**
* Parameter name.
*/
name;
/**
* Parameter target.
*/
target;
/**
* Indicates if this parameter is required or not
*/
required;
/**
* Additional parameter options.
* For example it can be uploader middleware options or body-parser middleware options.
*/
extraOptions;
constructor(actionMetadata, args) {
this.actionMetadata = actionMetadata;
this.target = args.object.constructor;
this.method = args.method;
this.extraOptions = args.extraOptions;
this.object = args.object;
this.index = args.index;
this.type = args.type;
this.required = args.required;
this.name = args.name || '';
}
}