leonardfactory / babel-plugin-transform-typescript-metadata

Babel plugin to emit decorator metadata like typescript compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

design:type metadata not created for decorated getter/setter

mzeiher opened this issue · 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.

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

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