1 | import { PendingWaiterState, Waiter } from './types';
|
2 | /**
|
3 | * Registers a waiter.
|
4 | *
|
5 | * @public
|
6 | * @param waiter {Waiter} A test waiter instance
|
7 | */
|
8 | export declare function register(waiter: Waiter): void;
|
9 | /**
|
10 | * Un-registers a waiter.
|
11 | *
|
12 | * @public
|
13 | * @param waiter {Waiter} A test waiter instance
|
14 | */
|
15 | export declare function unregister(waiter: Waiter): void;
|
16 | /**
|
17 | * Gets an array of all waiters current registered.
|
18 | *
|
19 | * @public
|
20 | * @returns {Waiter[]}
|
21 | */
|
22 | export declare function getWaiters(): Waiter[];
|
23 | /**
|
24 | * Clears all waiters.
|
25 | *
|
26 | * @private
|
27 | */
|
28 | export declare function _reset(): void;
|
29 | /**
|
30 | * Gets the current state of all waiters. Any waiters whose
|
31 | * `waitUntil` method returns false will be considered `pending`.
|
32 | *
|
33 | * @returns {PendingWaiterState} An object containing a count of all waiters
|
34 | * pending and a `waiters` object containing the name of all pending waiters
|
35 | * and their debug info.
|
36 | */
|
37 | export declare function getPendingWaiterState(): PendingWaiterState;
|
38 | /**
|
39 | * Determines if there are any pending waiters.
|
40 | *
|
41 | * @returns {boolean} `true` if there are pending waiters, otherwise `false`.
|
42 | */
|
43 | export declare function hasPendingWaiters(): boolean;
|