rescript-abort-controller
v0.1.0
Published
zero-cost bind for Web API AbortController
Downloads
2
Maintainers
Readme
rescript-abort-controller
Zero-cost bindings for Web API AbortController
Installation
Run the following in your favorit console:
> yarn add rescript-abort-controller
OR
> npm install --save rescript-abort-controller
Then, add rescript-abort-controller
in your bsconfig.json
:
-- "bs-dependencies": [],
++ "bs-dependencies": ["rescript-abort-controller"],
Usage
// construct
let abortController = AbortController.new()
// access property `signal`
abortController->AbortController.signal
// access method `abort`
abortController->AbortController.abort
Or you can check this examples.
API
(WIP)