monad-ts
Version:
Monad-ts is a small library implements some of key monads and way to chain them in a pipe (flow) in JavaScript and TypeScript. Angular 2+ compatible.
9 lines (8 loc) • 306 B
TypeScript
/**
* Converts timeout in a Promise, resolved when specified amount of time passes.
* @method wait
* @param {any} v - value should be returned.
* @param {number} [t = 0] t - amount of time, in millis.
* @return {Promise<T>}
*/
export declare function wait<T>(v: any, t?: number): Promise<T>;