Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法将axios-mini-program-adapter挂载到axios.defaults.adapter上 #50

Open
PolarishT opened this issue Aug 4, 2023 · 3 comments
Open

Comments

@PolarishT
Copy link

问题是什么

不能将类型“(config: AxiosRequestConfig) => AxiosPromise”分配给类型“AxiosAdapterConfig | AxiosAdapterConfig[] | undefined”。
不能将类型“(config: AxiosRequestConfig) => AxiosPromise”分配给类型“AxiosAdapter”。
参数“config”和“config” 的类型不兼容。
不能将类型“InternalAxiosRequestConfig”分配给类型“AxiosRequestConfig”。
属性“method”的类型不兼容。
不能将类型“string | undefined”分配给类型“Method | undefined”。
不能将类型“string”分配给类型“Method | undefined”。ts(2322)
(property) AxiosInstance.defaults: Omit<AxiosDefaults, "headers"> & {
headers: HeadersDefaults & {
[key: string]: AxiosHeaderValue;
};
}

环境

  • "@types/axios": "^0.14.0",
  • "axios": "^1.4.0",
  • "axios-miniprogram-adapter": "^0.3.5",

在线例子

尽可能提供在线例子

报错信息

image
@PolarishT
Copy link
Author

Particularly urgent!!!!

@bigmeow
Copy link
Owner

bigmeow commented Aug 4, 2023

不支持1.x 版本的 axios

@PolarishT
Copy link
Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants