@tempest/core
Version:
The core of the Tempest Stream Library
23 lines • 555 B
JavaScript
export class SubscriberSink {
constructor(_next, _error, _complete) {
this._next = _next;
this._error = _error;
this._complete = _complete;
}
static create(next, error, complete) {
return new SubscriberSink(next, error, complete);
}
event(t, x) {
const { _next } = this;
_next(x);
}
error(t, e) {
const { _error } = this;
_error(e);
}
end(t, x) {
const { _complete } = this;
_complete(x);
}
}
//# sourceMappingURL=SubscriberSink.js.map