pe.isStarted = function () {
        return this._started;
    };
    BaseChannel.prototype.postEvent = function (event) {
        if (!this._disposed && this.enabled()) {
            this._postEvent(event);
        }
    };
    BaseChannel.prototype.dispose = function () {
        if (!this._disposed) {
            this._disposed = true;
            this._disposePromise = Promise.resolve(this._dispose());
        }
        return this._disposePromise;
    };
    BaseChannel.prototype._ensureChannelIsStarted = function () {
        if (!this.isStarted()) {
            throw new Error("channel.start must be called before this method");
        }
    };
    return BaseChannel;
}());
exports.BaseChannel = BaseChannel;
