vue3+ts+vite,使用装饰器时报错 作为表达式调用时,无法解析类修饰器的签名。 The runtime will invoke the decorator with 2 arguments, but the decorator expects 1.ts(1238) 页面也无法打开 解决方案: { "extends": "@vue/tsconfig/tsconfig.dom.json", "include": ["env.d.ts", "src/**/*", "sr...
TS作为表达式调用时,无法解析类修饰器的签名 TS作为表达式调⽤时,⽆法解析类修饰器的签名 今天在搭建react项⽬的时候,遇到ts提⽰错误,如:代码:import concatRedux from '@utils/concatRedux'interface IProps extends IConnectProps {} interface IState { } @concatRedux('/home', 'HomeStore', ['...
6. 然后重启服务 否则装饰器无法识别 不声明的话vscode 执行 ts检测 也会报错作为表达式调用时,无法解析类修饰器的签名。 支持的四种装饰器 declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void; declare type PropertyDecorator = (target: Object, propertyKey: st...
解决方案:将 concatRedux 重命名可以绕过这个错误,如: import concatRedux from '@utils/concatRedux'interface IProps extends IConnectProps {} interface IState { }const concatReduxs: Function=concatRedux;@concatReduxs('/home', 'HomeStore', ['fetchHome']) exportdefaultclass Home extends React.Componen...
TS作为表达式调用时,无法解析类修饰器的签名 TS作为表达式调⽤时,⽆法解析类修饰器的签名 今天在搭建react项⽬的时候,遇到ts提⽰错误,如:代码:import concatRedux from '@utils/concatRedux'interface IProps extends IConnectProps {} interface IState { } @concatRedux('/home', 'HomeStore', ['...