delay

Delays the resolution of a Promise by the specified time.

Signature

export declare function delay<T>(time: number, result?: T): Promise<T>;
JSDoc
Parameters
time
The time in milliseconds to delay the resolution.
result
The value to resolve with after the delay.
Returns

A Promise that resolves after the specified time with the provided result.

Members

This export does not declare public properties or methods in the generated declaration file.