refactor(Cypress): Moved Cypress to the main folder of the project, as I don't need a sub project for now.

This commit is contained in:
2021-09-02 16:22:25 +02:00
parent d9226abf85
commit 89ec2d42ac
8402 changed files with 22 additions and 5 deletions

View File

@@ -0,0 +1,39 @@
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
import * as tslib_1 from "tslib";
import { Subscriber } from '../Subscriber';
export function defaultIfEmpty(defaultValue) {
if (defaultValue === void 0) {
defaultValue = null;
}
return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
}
var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
function DefaultIfEmptyOperator(defaultValue) {
this.defaultValue = defaultValue;
}
DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
};
return DefaultIfEmptyOperator;
}());
var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
tslib_1.__extends(DefaultIfEmptySubscriber, _super);
function DefaultIfEmptySubscriber(destination, defaultValue) {
var _this = _super.call(this, destination) || this;
_this.defaultValue = defaultValue;
_this.isEmpty = true;
return _this;
}
DefaultIfEmptySubscriber.prototype._next = function (value) {
this.isEmpty = false;
this.destination.next(value);
};
DefaultIfEmptySubscriber.prototype._complete = function () {
if (this.isEmpty) {
this.destination.next(this.defaultValue);
}
this.destination.complete();
};
return DefaultIfEmptySubscriber;
}(Subscriber));
//# sourceMappingURL=defaultIfEmpty.js.map