/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Licensed under the Apache License, Version 2.0.

See LICENSE file in the project root for details.
***************************************************************************** */
import { CancellationToken } from "./cancellation";
import { Cancelable } from "@esfx/cancelable";
/**
 * Asynchronously notifies one or more waiting Promises that an event has occurred.
 */
export declare class ManualResetEvent {
    private _signaled;
    private _waiters;
    /**
     * Initializes a new instance of the ManualResetEvent class.
     *
     * @param initialState A value indicating whether to set the initial state to signaled.
     */
    constructor(initialState?: boolean);
    /**
     * Gets a value indicating whether the event is signaled.
     */
    get isSet(): boolean;
    /**
     * Sets the state of the event to signaled, resolving one or more waiting Promises.
     */
    set(): void;
    /**
     * Sets the state of the event to nonsignaled, causing asynchronous operations to pause.
     */
    reset(): void;
    /**
     * Asynchronously waits for the event to become signaled.
     *
     * @param token A CancellationToken used to cancel the request.
     */
    wait(token?: CancellationToken | Cancelable): Promise<void>;
}
