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 nodejs native abort-controller if available #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martinheidegger
Copy link

Node 15 added AbortController and AbortSignal to the global scope.
This PR adds a ./node.js file that will use node.js globals if available and else falls back to the shim.

Note: I found it really hard to export AbortController as default AND add the AbortController/AbortSignal properties to it without extending AbortController so I dropped it. Sadly, this means that this PR is a breaking change as the default value is not available anymore.

Closes #24

@martinheidegger
Copy link
Author

Node 16.3 has been released in the meantime.

@taras
Copy link

taras commented Dec 22, 2022

We see the same problem with Node 18 + TypeScript 4.9.

@pietrovismara
Copy link

Same here, @taras did you find any workaround?

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

Successfully merging this pull request may close these issues.

Use native AbortController when possible.
3 participants