( maxListeners: number = DEFAULT_MAX_LISTENERS, )
| 16 | * @returns AbortController with configured listener limit |
| 17 | */ |
| 18 | export function createAbortController( |
| 19 | maxListeners: number = DEFAULT_MAX_LISTENERS, |
| 20 | ): AbortController { |
| 21 | const controller = new AbortController() |
| 22 | setMaxListeners(maxListeners, controller.signal) |
| 23 | return controller |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Propagates abort from a parent to a weakly-referenced child controller. |
no outgoing calls
no test coverage detected