gcanti / fp-ts-rxjs

fp-ts bindings for RxJS
https://gcanti.github.io/fp-ts-rxjs/
MIT License
188 stars 29 forks source link

Support rxjs 6 #6

Closed marcinwadon closed 6 years ago

marcinwadon commented 6 years ago

Hey @gcanti I think lib should be updated to use the newest version of fp-ts, ts and rxjs. What do you think? I can try to do that but it will take me some time as I'm newbie in fp-ts

marcinwadon commented 6 years ago

@gcanti Hey, I have a problem with declaration merging because after that:

declare module 'rxjs' {
  interface Observable<T> {
    _URI: URI
    _A: T
  }
}

that Observable is considered as the only one (seems like the original one is forgotten). Without that type inference does not work properly.

Here you can find the current code: https://github.com/marcinwadon/fp-ts-rxjs/blob/feature/rxjs/src/Observable.ts

gcanti commented 6 years ago

When using module augmentation you must augment the original definition file, try this

declare module 'rxjs/internal/Observable' {
  interface Observable<T> {
    _URI: URI
    _A: T
  }
}
marcinwadon commented 6 years ago

Thanks @gcanti, fair point

gcanti commented 6 years ago

Released fp-ts-rxjs@0.5.0