e2ed
Version:
E2E testing framework over Playwright
6 lines (5 loc) • 315 B
TypeScript
/**
* Adds a timeout to the promise, that is, return a promise that will either resolve
* as the original one or be rejected by a timeout with the specified error.
*/
export declare const addTimeoutToPromise: <Value>(promise: Promise<Value>, timeout: number, timeoutError?: Error | undefined) => Promise<Value>;