abort-controller icon indicating copy to clipboard operation
abort-controller copied to clipboard

Use nodejs native abort-controller if available

Open martinheidegger opened this issue 4 years ago • 3 comments

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 avatar Dec 04 '20 16:12 martinheidegger

Node 16.3 has been released in the meantime.

martinheidegger avatar Jun 14 '21 17:06 martinheidegger

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

taras avatar Dec 22 '22 17:12 taras

Same here, @taras did you find any workaround?

pietrovismara avatar Jan 16 '23 20:01 pietrovismara