How to use the @reactivex/rxjs/dist/cjs/Observable.Observable.of 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/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>() {
  return new Subject()
}</a></b>