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
breaking interface change #4109
Comments
Why is this closed? I just noticed that the type for export class Axios {
post<T = never, R = AxiosResponse<T>>(url: string, data?: T, config?: AxiosRequestConfig<T>): Promise<R>;
} |
@ChristianIvicevic yeah, sorry about that, I checked the merge request and there was link to ts sandbox and it seemed to work there so I thought it was issue on my end. will reopen. |
Same here, observed in the failing CI run of Dependabot's PR:
Here, interface LimitedInvitation {
token: string
state: string
}
async invitationAccept(token: string): Promise<LimitedInvitation> {
return axios
.patch<LimitedInvitation>(`/api/invitations/${token}`, {
state_event: 'accept',
})
.then(({ data }) => data)
} |
Ref #3002 (the original PR that included this change) |
@rijkvanzanten I don't think that was the PR that introduced this issue. The issue is caused by the It looks like |
I would really like to point out that:
|
Fixes #4109. Co-authored-by: Jay <jasonsaayman@gmail.com>
Fixes axios#4109. Co-authored-by: Jay <jasonsaayman@gmail.com>
Describe the bug
In #2995 merge request, there was introduced a bug.
There came 2 issues.
To Reproduce
pass input and output type to axios.post
Expected behavior
No type errors.
Environment
Additional context/Screenshots
The text was updated successfully, but these errors were encountered: