Skip to content

Latest commit

 

History

History

cancelable-dom

@esfx/cancelable-dom

The @esfx/cancelable-dom package provides a DOM interop library for @esfx/cancelable.

Overview

Installation

npm i @esfx/cancelable-dom

Usage

import { Cancelable } from "@esfx/cancelable";
import { toAbortSignal } from "@esfx/cancelable-dom";

async function doSomeWork(cancelable: Cancelable) {
    await fetch("some/uri", { signal: toAbortSignal(cancelable) });
}

API

You can read more about the API here.