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

Use provided AbortSignal or omit it from initialOptions type definition #3

Open
jaandrle opened this issue Oct 18, 2024 · 1 comment

Comments

@jaandrle
Copy link

There would be better to allow use also original Abort Signal (if provided):

const requestInit = (requestOptions || {});
requestInit.signal = abortController.current.signal;

 	 const requestInit = (requestOptions || {}); 
	 requestInit.signal = requestInit.signal ? mergeSignals(requestInit.signal, abortController.current.signal) : abortController.current.signal; 

…using https://www.npmjs.com/package/abort-utils

@w3cj
Copy link
Owner

w3cj commented Oct 18, 2024

Thanks! I will add this and a test soon. Will use the new built in AbortSignal.any() - https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants