@types/wait-promise
TypeScript icon, indicating that this package has built-in type declarations

0.4.2 • Public • Published

Installation

npm install --save @types/wait-promise

Summary

This package contains type definitions for wait-promise (https://github.com/akira-cn/wait-promise).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/wait-promise.

index.d.ts

export interface Wait {
    before(time: number): this;
    and(func: () => void): this;
    after(time: number): this;
    every(interval: number, limit?: number): this;
    limit(limit: number): this;
    check<T>(cond: () => T): Promise<T>;
    check(): Promise<void>;
    // The promise returned by `forward()` never resolves.
    forward(): Promise<void>;
    till<T>(cond: () => T): Promise<T>;
    until<T>(cond: () => T): Promise<T>;
}

export function every(interval: number, limit?: number): Wait;
export function and(func: () => void): Wait;
export function limit(limit: number): Wait;
export function before(time: number): Wait;
export function after(time: number): Wait;
export function sleep(time: number): Promise<void>;
export function until<T>(cond: () => T): Promise<T>;
// The promise returned by `forward()` never resolves.
export function forward(): Promise<void>;
export function till<T>(cond: () => T): Promise<T>;
export function check<T>(cond: () => T): Promise<T>;
export function check(): Promise<void>;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Paul Melnikow.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/wait-promise

Weekly Downloads

150

Version

0.4.2

License

MIT

Unpacked Size

4.64 kB

Total Files

5

Last publish

Collaborators

  • types