-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Adding lettable operators #2667
Conversation
- Note: typings incompatibility forced an `any` in the instance version. Very strange
moved to a separate `interfaces` file for cleaner organization
…ncise Thanks, David!
Also of note: There should be NO BREAKING CHANGES in in this PR. This should be able to ship with the next minor version |
Generated by 🚫 dangerJS |
note arguments length checking in prototype version
Also adds MonoTypeOperatorFunction
NOTE: The name is now `catchError` because `catch` is an invalid name for a function
NOTE: Since `do` is an invalid function name, it's called `tap`, which comes from older versions of RxJS
- also fixes typings on switch
NOTE: I am a little worried about a circular dependency here between ConnectableObservable and the lettable refCount
Also adds type overloads for pipe and for compose NOTE: For some reason TypeScript would not let me call compose(...operations) in the pipe method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can move forward for now as changes are mostly non-breaking and no blocking issues to be changes in this specific PR. As discussed probably we need small chunk of PR for easier change tracking.
|
||
export type FactoryOrValue<T> = T | (() => T); | ||
|
||
export type MonoTypeOperatorFunction<T> = OperatorFunction<T, T>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we'll likely to have OperatorFunction<T, R=T>
in next
if we pick this up into, possible candidate for breaking changes.
It looks like both |
@jasonaden... you're exactly right... Ramda's compose is right to left. On it's own, it's not quite "pipe"... hmm |
hi when I saw the fallowing code I did some investigation and it turned out that TypeScript version 2.4 is required. Does it mean that since RxJS 5.5 TS 2.4 will be required ? marcin |
Hi @benlesh. What you've done here is awesome! I've started working on a project already using the lettable operators, however it's a bit of a hassle having to manually build Also, I take it all operators will eventually become lettables? I was missing some, like import {startWith as startWithOnThis} from 'rxjs/dist/cjs/operator/startWith'
export const startWith = (...elements) => (observable) => startWithOnThis.apply(observable, elements) One more thing, aside from PS |
@nileani ... This will all be in 5.5 as soon as we're done porting them over. It shouldn't be too long. Sorry for the inconvenience. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is a WIP, do not merge.
Just planting a flag so people see progress being made.
The overall idea here is that inevitably you'll be able to do this:
I've got a lot of plans here, and there's clearly a lot of work to do. I'd just ask people to refrain from making PRs against this branch until they've chatted with me about it first, I'm still getting this idea to gel within this repository, and how we're going to migrate things toward a more T-Rx project.