import DebugInfo from './-internal/debug-info'; /** Clears listeners that were previously setup for `ajaxSend` and `ajaxComplete`. @private */ export declare function _teardownAJAXHooks(): void; /** Sets up listeners for `ajaxSend` and `ajaxComplete`. @private */ export declare function _setupAJAXHooks(): void; export interface SettledState { hasRunLoop: boolean; hasPendingTimers: boolean; hasPendingWaiters: boolean; hasPendingRequests: boolean; hasPendingTransitions: boolean | null; isRenderPending: boolean; pendingRequestCount: number; debugInfo: DebugInfo; } /** Check various settledness metrics, and return an object with the following properties: - `hasRunLoop` - Checks if a run-loop has been started. If it has, this will be `true` otherwise it will be `false`. - `hasPendingTimers` - Checks if there are scheduled timers in the run-loop. These pending timers are primarily registered by `Ember.run.schedule`. If there are pending timers, this will be `true`, otherwise `false`. - `hasPendingWaiters` - Checks if any registered test waiters are still pending (e.g. the waiter returns `true`). If there are pending waiters, this will be `true`, otherwise `false`. - `hasPendingRequests` - Checks if there are pending AJAX requests (based on `ajaxSend` / `ajaxComplete` events triggered by `jQuery.ajax`). If there are pending requests, this will be `true`, otherwise `false`. - `hasPendingTransitions` - Checks if there are pending route transitions. If the router has not been instantiated / setup for the test yet this will return `null`, if there are pending transitions, this will be `true`, otherwise `false`. - `pendingRequestCount` - The count of pending AJAX requests. - `debugInfo` - Debug information that's combined with info return from backburner's getDebugInfo method. - `isRenderPending` - Checks if there are any pending render operations. This will be true as long as there are tracked values in the template that have not been rerendered yet. @public @returns {Object} object with properties for each of the metrics used to determine settledness */ export declare function getSettledState(): SettledState; /** Checks various settledness metrics (via `getSettledState()`) to determine if things are settled or not. Settled generally means that there are no pending timers, no pending waiters, no pending AJAX requests, and no current run loop. However, new settledness metrics may be added and used as they become available. @public @returns {boolean} `true` if settled, `false` otherwise */ export declare function isSettled(): boolean; /** Returns a promise that resolves when in a settled state (see `isSettled` for a definition of "settled state"). @public @returns {Promise} resolves when settled */ export default function settled(): Promise; //# sourceMappingURL=settled.d.ts.map