Skip to content

ohos-rs/abort-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

@ohos-rs/abort-controller

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.

Required

API Version >= 11

Install

ohpm install @ohos-rs/abort-controller

Usage

const controller = new AbortController();

asyncFib(20, controller.signal).catch((e: ESObject) => {
    console.error(e) // Error: AbortError
})

controller.abort()

About

AbortController for OpenHarmony based on `emitter`.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published