File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export class ParamMetadata {
4747 /**
4848 * Parameter target type.
4949 */
50- targetType : any ;
50+ targetType ? : any ;
5151
5252 /**
5353 * Parameter target type's name in lowercase.
@@ -114,14 +114,15 @@ export class ParamMetadata {
114114 this . transform = args . transform ;
115115 this . classTransform = args . classTransform ;
116116 this . validate = args . validate ;
117+
117118 if ( args . explicitType ) {
118- this . targetType = args . explicitType
119- } else {
120- const metadata = ( Reflect as any ) . getMetadata ( "design:paramtypes" , args . object , args . method ) ;
121- if ( typeof metadata ! = "undefined" ) {
122- this . targetType = metadata [ args . index ] ;
123- }
124- }
119+ this . targetType = args . explicitType ;
120+ } else {
121+ const ParamTypes = Reflect . getMetadata ( "design:paramtypes" , args . object , args . method ) ;
122+ if ( typeof ParamTypes != = "undefined" ) {
123+ this . targetType = ParamTypes [ args . index ] ;
124+ }
125+ }
125126
126127 if ( this . targetType ) {
127128 if ( this . targetType instanceof Function && this . targetType . name ) {
You can’t perform that action at this time.
0 commit comments