ngx-echarts
Version:
<!-- Badges section here. --> [][npm-badge-url] [][npm-badge-url] [][ci
80 lines (79 loc) • 2.2 kB
JavaScript
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
import { of, empty } from 'rxjs';
var ChangeFilter = /** @class */ (function () {
/**
* @param {?} _changes
*/
function ChangeFilter(_changes) {
this._changes = _changes;
}
/**
* @param {?} changes
* @return {?}
*/
ChangeFilter.of = function (changes) {
return new ChangeFilter(changes);
};
/**
* @template T
* @param {?} key
* @return {?}
*/
ChangeFilter.prototype.notEmpty = function (key) {
if (this._changes[key]) {
var /** @type {?} */ value = this._changes[key].currentValue;
if (value !== undefined && value !== null) {
return of(value);
}
}
return empty();
};
/**
* @template T
* @param {?} key
* @return {?}
*/
ChangeFilter.prototype.has = function (key) {
if (this._changes[key]) {
var /** @type {?} */ value = this._changes[key].currentValue;
return of(value);
}
return empty();
};
/**
* @template T
* @param {?} key
* @return {?}
*/
ChangeFilter.prototype.notFirst = function (key) {
if (this._changes[key] && !this._changes[key].isFirstChange()) {
var /** @type {?} */ value = this._changes[key].currentValue;
return of(value);
}
return empty();
};
/**
* @template T
* @param {?} key
* @return {?}
*/
ChangeFilter.prototype.notFirstAndEmpty = function (key) {
if (this._changes[key] && !this._changes[key].isFirstChange()) {
var /** @type {?} */ value = this._changes[key].currentValue;
if (value !== undefined && value !== null) {
return of(value);
}
}
return empty();
};
return ChangeFilter;
}());
export { ChangeFilter };
function ChangeFilter_tsickle_Closure_declarations() {
/** @type {?} */
ChangeFilter.prototype._changes;
}
//# sourceMappingURL=change-filter.js.map