is there way to use parameter decorators with Babel as it is possible in Typescript.
sample of a typescript code:
class A {
constructor(@Inject('IService') private service: IService) {
}
}
I want to write this code with Babel:
class A {
constructor(@Inject('IService') service) {
this.service = service;
}
}
I haven't found any info on this question yet. Is there like a plugin in a certain preset that does exactly this?
If there's not way to do that without crutches, is there way to use decorators on constructors ? Example
class A {
@Inject('IService')
constructor(service) {
this.service = service;
}
}
Thanks.
this.service = getIService()in the constructor?