Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,30 @@ export function stringify(value: any, replacer?: any, space?: string | number):
*
* @param timeout - The number of milliseconds to wait before resolving the Promise.
* @param returnValue - The value that the Promise will resolve to.
* @param options - Optional settings.
*
* @return A Promise that resolves with `returnValue`.
*/
export function wait<T>(timeout?: number, returnValue?: T): Promise<T>;
export function wait<T>(timeout?: number, returnValue?: T, options?: wait.Options): Promise<T>;

export namespace wait {

interface Options {

/**
* setTimeout function to be used by wait.
*
*/
readonly setTimeout?: (
/**
*
* @param callback - A function to be executed after the timer expires.
* @param delay - The time, in milliseconds that the timer should wait before the specified function is executed.
*
*/
callback: Function, delay: number) => void;
}
}


/**
Expand Down