-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[TS] Add AbortSignal to fetch template #3101
Conversation
I've added conditional generation, depending on TypeScript version. |
Is this a feature which is supported in all browsers/fetch implementations? |
The original discussion about aborting fetch (1) (2) ended up using I don't mind hiding this behind a config setting Also, it's dependent on the TS version, because earlier versions didn't have types for |
As its experimental and potentially a breaking change i think its better to put this behind a config (UseAbortSignal, default: false). Is that ok? Can you update the PR? |
Sounds good to me, I'll update the PR |
Add UseAbortSignal (false by default) setting to enable abortable fetch support
@nulladdict can we merge this PR? |
I think so, if there are no problems with liquid template. |
Lgtm, thanks for the PR. |
No problem, should we also update the documentation for new |
Just add a new group there and document it - that's probably fine. Thanks. |
This adds support for AbortSignal for Fetch template
I've mostly followed this PR for axios
One thing I'm concerned about is that it seems like
AbortSignal
typings were added in TypeScript 2.7, so I wonder if signal generation should be opt-in through some kind of setting