/** * Provides mechanism for blocking async processes and unblocking them from an external context. * * @template T The value that can be passed to {@link unblock} to resolve the {@link block} promise. */ export declare class Blocker { private _promise?; private _unblock?; /** * `true` if {@link Blocker} is blocked and wasn't unblocked yet, or `false` otherwise. */ get isBlocked(): boolean; /** * Returns promises that is fulfilled with the result passed to {@link unblock}. If blocker is already blocked * then the same promise is returned. */ block(): Promise; /** * Fulfills the promise returned from {@link block}. If the blocker isn't blocked then no-op. */ unblock(value: T): void; }