Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/grm/deps.ts>pseudoCancellable

MTProto API Client for Deno 🦕
Go to Latest
function pseudoCancellable
import { pseudoCancellable } from "https://deno.land/x/grm@0.8.0/deps.ts";

Takes in a regular Promise and returns a CancellablePromise. If canceled, the CancellablePromise will immediately reject with a Cancellation, but the asynchronous operation will not truly be aborted.

Analogous to make-cancellable-promise.

Parameters

promise: PromiseLike<T>