如何使用typescript装饰器知道类属性的类型

时间:2017-01-10 22:26:28

标签: typescript dependency-injection decorator

我想知道使用typescript装饰器

的类属性的类型

例如:

function Inject(constr : Function){
  //how to get engine property and its type!!! 
}

@Inject
class Car{

  constructor(private engine : Engine){}

}

class Engine{

  constructor(){}

}

0 个答案:

没有答案
相关问题