typescript编译Decorators时报错:Unable to resolve signature of method decorator when called as an expression.

问题:

在运行typescript:Handbook/Decrators文档示例时报错如下:

注意:虽然报错,但是编译成功了!

解决:

可以通过监听ts文件的热更新,解决ts报错:

参考:

Type Script decorator error TS1241: Unable to resolve signature of method decorator when called as an expression