design:paramtypes does not work with object assignment
jeffborg opened this issue · comments
Jeffrey Borg commented
Been using type-graphql and came across this issue
Here is a sample class which returns a void type for the argument
class Demo {
@Method()
test(@Args(): { destructedProp } : ClassType) {}
}
This sample works
class Demo {
@Method()
test(@Args(): arg : ClassType) {}
}
It seems the param.type
here https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/blob/master/src/metadata/serializeType.ts#L25 is ObjectPattern
and this results in returning voidZero()
Leonardo Ascione commented
Thank you @jeffborg ! Released it in v0.3.2 👍🏼