We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
useAxios 目前仅支持一个泛型参数作为response类型,希望可以为AxiosRequestConfig也新增一个类型参数来定义data属性的类型
interface StrictUseAxiosReturn<T, D> extends UseAxiosReturn<T> { /** * Manually call the axios request */ execute: ( url?: string | AxiosRequestConfig<D>, config?: AxiosRequestConfig<D> ) => PromiseLike<StrictUseAxiosReturn<T, D>>; } declare function useAxios<T = any, D = any>( url: string, config?: AxiosRequestConfig, options?: UseAxiosOptions ): StrictUseAxiosReturn<T, D> & PromiseLike<StrictUseAxiosReturn<T, D>>;
我是ts菜鸟,也许可以解决?
No response
The text was updated successfully, but these errors were encountered:
@azaleta 谢谢你,可以的话,都加了个 D 了,能再加个范型 E 用于给error指定类型吗
Sorry, something went wrong.
#2248 I don't think it is E it shoud be D
Fixed via #2248
No branches or pull requests
Clear and concise description of the problem
useAxios 目前仅支持一个泛型参数作为response类型,希望可以为AxiosRequestConfig也新增一个类型参数来定义data属性的类型
Suggested solution
我是ts菜鸟,也许可以解决?
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: