const repeatedEditors = eventSources.activeEditors.switchMap(editor => { if (editor == null) { return Observable.of(editor); } return Observable.concat( Observable.of(editor), this._newProviderEvents.mapTo(editor), ); });