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 {
47
47
/**
48
48
* Parameter target type.
49
49
*/
50
- targetType : any ;
50
+ targetType ? : any ;
51
51
52
52
/**
53
53
* Parameter target type's name in lowercase.
@@ -114,14 +114,15 @@ export class ParamMetadata {
114
114
this . transform = args . transform ;
115
115
this . classTransform = args . classTransform ;
116
116
this . validate = args . validate ;
117
+
117
118
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
+ }
125
126
126
127
if ( this . targetType ) {
127
128
if ( this . targetType instanceof Function && this . targetType . name ) {
You can’t perform that action at this time.
0 commit comments