AbortController for OpenHarmony based on emitter.
The bulk of the code in this project is derived from node-abort-controller, with certain alterations made to suit the features of HarmonyOS.
ohpm install @ohos-rs/abort-controllerconst controller = new AbortController();
asyncFib(20, controller.signal).catch((e: ESObject) => {
console.error(e) // Error: AbortError
})
controller.abort()