Skip to main content
Module

std/async/mod.ts>abortable

Deno standard library
Go to Latest
function abortable
import { abortable } from "https://deno.land/std@0.136.0/async/mod.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>