babel-plugin-transform-typescript-metadata icon indicating copy to clipboard operation
babel-plugin-transform-typescript-metadata copied to clipboard

design:type metadata not created for decorated getter/setter

Open mzeiher opened this issue 6 years ago • 2 comments

sample:

@decorator()
get value(): string { ... }

set value(value:string) {}

Typescript annotates the getter/setter with design:type: String for the property "value", the plugin detects it as a method and only annotates design:paramtype if you are decorating the settter, if you are decorating the getter no type information are set.

mzeiher avatar Apr 01 '19 07:04 mzeiher

Interesting, didn’t think about that! I’ll add the feature in these days

leonardfactory avatar Apr 03 '19 00:04 leonardfactory

In case someone else is looking for a workaround, until then you could add a @Reflect.metadata("design:type", String) decorator.

stephtr avatar Jan 05 '20 11:01 stephtr