An open API service indexing awesome lists of open source software.

https://github.com/js2me/with-abort-controller


https://github.com/js2me/with-abort-controller

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# WithAbortController

```ts
export class WithAbortController {
protected abortController: AbortController
protected abortSignal:AbortSignal;

protected constructor(abortSignal?: AbortSignal){
this.abortController = new AbortController();
this.abortSignal = this.abortController.signal;

if (abortSignal) {
abortSignal.addEventListener('abort', () => this.abortController.abort());
}
}
}
```