https://github.com/js2me/with-abort-controller
https://github.com/js2me/with-abort-controller
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/js2me/with-abort-controller
- Owner: js2me
- License: mit
- Created: 2024-11-11T19:58:40.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-12T09:48:42.000Z (over 1 year ago)
- Last Synced: 2025-12-31T17:51:31.514Z (6 months ago)
- Language: JavaScript
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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());
}
}
}
```