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