mirror of
https://github.com/tenrok/axios.git
synced 2026-06-11 18:02:32 +03:00
Added generic AxiosAbortSignal TS interface to avoid importing AbortController polyfill (#4229)
* Added generic `AxiosAbortSignal` TS interface to avoid importing AbortController polyfill; * Renamed `AxiosAbortSignal` to `GenericAbortSignal` to use the same naming style as `GenericFormData`; * Added TS test for `GenericAbortSignal` interface; Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -375,3 +375,7 @@ axios.get('/user')
|
||||
// FormData
|
||||
|
||||
axios.toFormData({x: 1}, new FormData());
|
||||
|
||||
// AbortSignal
|
||||
|
||||
axios.get('/user', {signal: new AbortController().signal});
|
||||
|
||||
Reference in New Issue
Block a user