创建 redux 中间件以将标头参数添加到 axios 请求时出错

问题描述

我正在尝试自动向所有 axios 请求添加访问令牌,并且我正在使用(或尝试)中间件。但我收到以下错误{}

store/index.ts

data Stmt = {}

中间件.ts

'store' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.

我的中间件不正确吗?我该如何输入(我尝试过 StackOverflow 中的不同方法,但它们导致了不同的错误)?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)