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

x/websocket_broadcastchannel/test/fn.ts>rejectOnTimeout

Host-wide BroadcastChannel for Deno CLI, backed by WebSockets.
Latest
function rejectOnTimeout
import { rejectOnTimeout } from "https://deno.land/x/websocket_broadcastchannel@0.8.0/test/fn.ts";

Rejects the promise if it does not resolve within the given timeout.

Parameters

promise: Promise<T> | Promise<T>[]

The promise to reject on timeout.

optional
timeoutMs = [UNSUPPORTED]

The timeout in milliseconds.

Returns

Promise<T>