Skip to content

timeout

Returns a Promise that rejects after the specified timeout period.

Import:

import { timeout } from '@mnaoumov/typescript-lib/async';

Signature:

function timeout(params: TimeoutParams): Promise<never>

Parameters:

Parameter Type Description
params TimeoutParams The parameters for the function.

Returns: Promise<never> — A Promise that always rejects with a timeout error.


Links to this page: