Module

std/async/abortable.ts>abortable

Deno standard library
Go to Latest
function abortable
import { abortable } from "https://dotland.deno.dev/std@0.131.0/async/abortable.ts";

Make Promise or AsyncIterable abortable with the given signal.

Parameters

p: Promise<T>
signal: AbortSignal

Returns

Promise<T>

Parameters

p: AsyncIterable<T>
signal: AbortSignal

Returns

AsyncGenerator<T>

Parameters

p: Promise<T> | AsyncIterable<T>
signal: AbortSignal

Returns

Promise<T> | AsyncIterable<T>