diffusion
Version:
Diffusion JavaScript client
66 lines (65 loc) • 1.59 kB
JavaScript
;
/**
* @module TopicUpdate
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvalidUnsetStream = void 0;
var errors_1 = require("./../../errors/errors");
/**
* An update stream delegate that is used after the update stream has encountered
* an invalid operation and a value was not set.
*/
var InvalidUnsetStream = /** @class */ (function () {
/**
* Create a new InvalidUnsetStream instance
*
* @param err the error that occurred
*/
function InvalidUnsetStream(err) {
this.err = err;
}
/**
* @inheritdoc
*/
InvalidUnsetStream.prototype.set = function () {
return Promise.reject(this.err);
};
/**
* @inheritdoc
*/
InvalidUnsetStream.prototype.get = function () {
throw new errors_1.IllegalStateError('No value has been set');
};
/**
* @inheritdoc
*/
InvalidUnsetStream.prototype.validate = function () {
return Promise.reject(this.err);
};
/**
* @inheritdoc
*/
InvalidUnsetStream.prototype.onSetComplete = function () {
// no-op
};
/**
* @inheritdoc
*/
InvalidUnsetStream.prototype.onSetFailed = function () {
// no-op
};
/**
* @inheritdoc
*/
InvalidUnsetStream.prototype.onValidateComplete = function () {
// no-op
};
/**
* @inheritdoc
*/
InvalidUnsetStream.prototype.onValidateFailed = function () {
// no-op
};
return InvalidUnsetStream;
}());
exports.InvalidUnsetStream = InvalidUnsetStream;