如何在Typescript中测试/断言变量类型不是"any“?我不需要运行时检查,如果编译器得到一个错误来检测这一点就足够了:let foo: any = 'value'// tsc should throw an error here解决方案应该只针对一次检查,而不是整个项目(比如使用--noImplicit
const decorate = function () return function ( target: any ) return class myExtendClass extendstarget{}};@decorate()不幸的是,我得到了type any is not a constructor function