2
0
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:
Dmitriy Mozgovoy
2022-05-04 22:23:01 +03:00
committed by GitHub
parent eaaab30442
commit 384b7e6994
2 changed files with 12 additions and 1 deletions
+4
View File
@@ -375,3 +375,7 @@ axios.get('/user')
// FormData
axios.toFormData({x: 1}, new FormData());
// AbortSignal
axios.get('/user', {signal: new AbortController().signal});