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

x/grm/deps.ts>CancellablePromise.allSettled

MTProto API Client for Deno 🦕
Go to Latest
method CancellablePromise.allSettled
Re-export
import { CancellablePromise } from "https://deno.land/x/grm@0.8.0/deps.ts";

Creates a CancellablePromise that is resolved with an array of results when all of the provided Promises resolve or reject.

Type Parameters

T extends readonly unknown[] | readonly [unknown]

Parameters

values: T

An array of Promises.

Returns

CancellablePromise<-readonly [P in keyof T]: PromiseSettledResult<T[P] extends PromiseLike<infer U> ? U : T[P]>>

A new CancellablePromise.

Creates a CancellablePromise that is resolved with an array of results when all of the provided Promises resolve or reject.

Parameters

values: Iterable<T>

An array of Promises.

Returns

CancellablePromise<PromiseSettledResult<T extends PromiseLike<infer U> ? U : T>[]>

A new CancellablePromise. Canceling it cancels all of the input promises.