【发布时间】:2018-06-21 19:37:31
【问题描述】:
我正在尝试在类装饰器中获取运行时(缩小!)的类的名称。
当我这样做时:
const metadata = Reflect.getMetadata('design:type', target.constructor);
我不确定。我需要知道类名而不是缩小值。我以为 TSC 会写关于班级名称的元数据信息,但我找不到任何证据。
我有
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
设置
【问题讨论】:
-
您找到解决方案了吗?
-
@Richard 不,很遗憾没有。
标签: typescript