-
Notifications
You must be signed in to change notification settings - Fork 0
Observable class vs builders #10
Comments
The advantage of using plain functions, btw, is that it's easier to minify the code with tools such as Webpack / Rollup. Because these minifiers are pretty dumb and work at the import level. But then not everybody works with Google Closure and the interoperability of that with TypeScript definitions is experimental anyway. And I have a feeling that an |
@alexandru from memory: Class methods and functions do not have the same variance behaviour. |
@sledorze that changed from version 2.6 in
|
As in monix Observable operators and builders also share same namespace within import * as Mx from "monix-reactive"
const stream: Mx.Observable<number> = Mx.intervalAtFixedRate(1000).pipe(Mx.map(_ => _ * 2)) Going to try that and see how it looks. |
@lostintime that changed for functions only (not class methods) |
Devil .. :) |
From what I understand
Observable
has static methods in it. Maybe those static methods should not be described on theObservable
class.Maybe we need an
Observables
object (not class).Here's the point at which we need to investigate what other libraries are doing:
I see for example that
most
works with plain functions. Maybe that's not bad at all.I mean I can see people doing this:
The text was updated successfully, but these errors were encountered: