/**
 * @packageDocumentation
 *
 * Similar to [AbortSignal.any](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static)
 * except the returned promise has a `.clear` method that removes all event
 * listeners added to passed signals preventing memory leaks.
 *
 * At the time of writing at least, `AbortSignal.any` leaks memory in Node.js
 * and Deno environments:
 *
 * - https://github.com/nodejs/node/issues/54614
 * - https://github.com/denoland/deno/issues/24842
 *
 * @example
 *
 * ```js
 * import { anySignal } from 'any-signal'
 *
 * const userController = new AbortController()
 *
 * // Abort after 1 second
 * const timeoutSignal = AbortSignal.timeout(1000)
 *
 * const combinedSignal = anySignal([userController.signal, timeoutSignal])
 * combinedSignal.addEventListener('abort', () => console.log('Abort!'))
 *
 * try {
 *   // The user or the timeout can now abort the action
 *   await performSomeAction({ signal: combinedSignal })
 * } finally {
 *   // Clear will clean up internal event handlers
 *   combinedSignal.clear()
 * }
 * ```
 */
export interface ClearableSignal extends AbortSignal {
    clear(): void;
}
/**
 * Takes an array of AbortSignals and returns a single signal.
 * If any signals are aborted, the returned signal will be aborted.
 */
export declare function anySignal(signals: Array<AbortSignal | undefined | null>): ClearableSignal;
//# sourceMappingURL=index.d.ts.map