feat!: support custom AbortSignal with timeout#508
Conversation
|
cc @kricsleo wdyt? I think we dont need to use the custom AbortController, we should be able to only use the signal 😄 |
|
I'm not using these APIs just for compatibility reasons; |
Actually it is Chrome 103+, but with AbortError instead of Timeout Error. But you are right |
|
Both are available in latest baseline which is good. However we could do better with backward compat and introduce new API requirements in a major.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #508 +/- ##
===========================================
+ Coverage 56.86% 93.17% +36.30%
===========================================
Files 16 4 -12
Lines 728 205 -523
Branches 113 110 -3
===========================================
- Hits 414 191 -223
+ Misses 303 14 -289
+ Partials 11 0 -11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
like this? |
AbortSignal with timeoutAbortSignal with timeout
pi0
left a comment
There was a problem hiding this comment.
Thanks! Since now targetting v2, i have updated to use simpler Abortsignal.timeout 👍🏼
This PR uses a
AbortSignal.timeout()merged with an optionaloptions.signalwithAbortSignal.any()resolves #326
This should make the following obsolete: #481.