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

Add Typescript HTTP method definition for LINK and UNLINK #2440

Closed
marlonbarcarol opened this issue Sep 26, 2019 · 0 comments · Fixed by #2444
Closed

Add Typescript HTTP method definition for LINK and UNLINK #2440

marlonbarcarol opened this issue Sep 26, 2019 · 0 comments · Fixed by #2444

Comments

@marlonbarcarol
Copy link
Contributor

Versions of axios below 19.0 used to have the AxiosRequestConfig.method declared as a string, with the new version, methods are now declared as:

export type Method =
  | 'get' | 'GET'
  | 'delete' | 'DELETE'
  | 'head' | 'HEAD'
  | 'options' | 'OPTIONS'
  | 'post' | 'POST'
  | 'put' | 'PUT'
  | 'patch' | 'PATCH'

Since the new version typescript has been generating the errors due to the lack of the methods link and unlink:
Type '"link"' is not assignable to type 'Method'.
Type '"unlink"' is not assignable to type 'Method'.

@marlonbarcarol marlonbarcarol changed the title Add LINK and UNLINK methods to axios Add Typescript HTTP method definition for LINK and UNLINK Oct 1, 2019
@axios axios locked and limited conversation to collaborators May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant