How to use the @reactivex/rxjs/dist/cjs/Observable.Observable.empty function in @reactivex/rxjs

To help you get started, we’ve selected a few @reactivex/rxjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github reactive-react / xreact / src / xs / rx.ts View on Github external
import '@reactivex/rxjs/dist/cjs/add/operator/filter'
import '@reactivex/rxjs/dist/cjs/add/observable/empty'
import '@reactivex/rxjs/dist/cjs/add/observable/of'

import '@reactivex/rxjs/dist/cjs/add/observable/combineLatest'

declare module './index' {
  interface M_<a> {
    '@reactivex/rxjs': RxStream</a><a>
  }
}

export const URI = '@reactivex/rxjs'
export type URI = typeof URI

StreamOps.prototype.empty = RxStream.empty

StreamOps.prototype.just = RxStream.of

StreamOps.prototype.scan = function(f, base, fa) {
  return fa.scan(f, base)
}
StreamOps.prototype.combine = function(f, ...v) {
  return RxStream.combineLatest(v, f)
}
StreamOps.prototype.filter = function </a><a>(f: (a: A) =&gt; boolean, fa: RxStream</a><a>): RxStream</a><a> {
  return fa.filter(f)
}
StreamOps.prototype.map = function (f: (a: A) =&gt; B, fa: RxStream</a><a>): RxStream<b> {
  return fa.map(f)
}
StreamOps.prototype.subject = function </b></a><b><a>() {</a></b>
github reactive-react / xreact / src / xs / rx.ts View on Github external
import { Subject } from '@reactivex/rxjs/dist/cjs/Subject'
import { Subscription, StreamOps } from '..'
import '@reactivex/rxjs/dist/cjs/add/operator/map'
import '@reactivex/rxjs/dist/cjs/add/operator/merge'
import '@reactivex/rxjs/dist/cjs/add/operator/catch'
import '@reactivex/rxjs/dist/cjs/add/operator/filter'
import '@reactivex/rxjs/dist/cjs/add/observable/empty'
import '@reactivex/rxjs/dist/cjs/add/observable/combineLatest'

declare module '..' {
  interface HKT<a> {
    Observable: Observable</a><a>
  }
}

StreamOps.prototype.empty = Observable.empty

StreamOps.prototype.combine = function(f, ...v) {
  return Observable.combineLatest(v, f)
}
StreamOps.prototype.filter = function </a><a>(f: (a: A) =&gt; boolean, fa: Observable</a><a>): Observable</a><a> {
  return fa.filter(f)
}
StreamOps.prototype.map = function (f: (a: A) =&gt; B, fa: Observable</a><a>): Observable<b> {
  return fa.map(f)
}
StreamOps.prototype.subject = function </b></a><b><a>() {
  return new Subject()
}

StreamOps.prototype.subscribe = function </a><a>(fa: Observable</a><a>, next: (v: A) =&gt; void, complete?: () =&gt; void) {
  return fa.catch(x =&gt; {</a></b>