Rx.zip(s1, s2).pipe( take(2), map(s => s + " : on " + new Date()) ).subscribe(s => console.log(s));
ngOnInit() { const dialogType = this.matDialogRef.componentInstance.constructor; const cachedValue = this.positionCache.get(dialogType); this.offset = cachedValue || this._getOffset(); this._updatePosition(this.offset.y, this.offset.x); this.matDialogRef.beforeClose().pipe(take(1)) .subscribe(() => this.positionCache.set(dialogType, this.offset)); }
_run(cb) { this.done = cb; const self = this; const events = observe(this.rl); events.normalizedUpKey.pipe(takeUntil(events.line)) .forEach(this.onUpKey.bind(this)); events.normalizedDownKey.pipe(takeUntil(events.line)) .forEach(this.onDownKey.bind(this)); events.line.pipe( take(1), map(this.getCurrentValue.bind(this)), flatMap(value => runAsync(self.opt.filter)(value).catch(err => err)) ) .forEach(this.onSubmit.bind(this)); cliCursor.hide(); this.render(); return this; }
initActions() { this.createAction( PRODUCT_FETCH, page => { getProducts(page) .pipe(take(1)) .subscribe(this.actions.setProducts); return { ...this.state, loading: true }; }, "fetchProducts" ); this.createAction( PRODUCT_RESPONSE, payload => { return { ...this.state, products: payload, loading: false }; }, "setProducts" ); }
}) .pipe( take(1), tap((externalModule: ExternalModuleConfiguration) => { const isPresent = this.ipfsHashMapService.hashMap.filter(
.pipe(take(1)) .pipe(takeUntil(this._onDestroy)) .subscribe(() => {
it('should filter the options available and hightlight the first option in the list, filter the options by input "c" and reset the list', (done) => { .pipe(take(1)) .subscribe(() => { .pipe(take(1)) .subscribe((opened) => { expect(opened).toBe(true); .pipe(take(1)) .subscribe(() => { fixture.detectChanges(); .pipe(take(1)) .subscribe(() => { fixture.detectChanges();
}) .pipe( take(1), tap((externalModule: ExternalModuleConfiguration) => { const isPresent = this.ipfsHashMapService.hashMap.filter(