@whatwg-node/server
Version:
Fetch API compliant HTTP Server adapter
17 lines (16 loc) • 762 B
text/typescript
/**
* ⚠️ straight up copy from @graphql-hive/signal@2.0.0
*
* copied because of circular dependencies, where hive gateway monorepo uses whatwg server and also
* hosts the signal package. importing that package from whatwg-server will fail with tsx. it was
* thought that this was fixed with a package patch in hive gateway - but apparently not...
*/
/**
* Memory safe ponyfill of `AbortSignal.any`. In Node environments, the native
* `AbortSignal.any` seems to be leaky and can lead to subtle memory leaks over
* a larger period of time.
*
* This ponyfill is a custom implementation that makes sure AbortSignals get properly
* GC-ed as well as aborted.
*/
export declare function abortSignalAny(signals: AbortSignal[]): AbortSignal | undefined;