Skip to content

Commit f859d7a

Browse files
committed
Reformatting PR #271
1 parent 546947e commit f859d7a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/metadata/ParamMetadata.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)