UNPKG

@storm-stack/utilities

Version:

This package includes various base utility class and various functions to assist in the development process.

9 lines (8 loc) 350 B
/** * Returns a promise that rejects with a `TimeoutError` after a specified delay. * * @param ms - The delay duration in milliseconds. * @returns A promise that rejects with a `TimeoutError` after the specified delay. * @throws Throws a `TimeoutError` after the specified delay. */ export declare function timeout(ms: number): Promise<never>;