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