Skip to content

refactor(concat): support N-args with scheduler#5857

Merged
benlesh merged 6 commits intoReactiveX:masterfrom
cartant:static-concat-n-args
Oct 28, 2020
Merged

refactor(concat): support N-args with scheduler#5857
benlesh merged 6 commits intoReactiveX:masterfrom
cartant:static-concat-n-args

Conversation

@cartant
Copy link
Copy Markdown
Collaborator

@cartant cartant commented Oct 26, 2020

Description:

This PR refactors the static concat to use N-args in the signature that accepts a trailing scheduler. And adds a bunch of this-usage-should-fail dtslint tests.

For whatever reason, the problems that occurred in the PRs that were opened for the static merge and combineLastest functions do not seem to occur here. A lot was going on in those PRs - and the conversations that took place in those PRs aren't especially easy to follow - but I would not be surprised if there is some small difference that effects different behaviour. For example, temporarily adding a signature that included a concurrency (for the purposes of experimentation) seemed to break things, so ... 🤷‍♂️ this seems fine here, but we might still have problems elsewhere. 🤞

Related issue (if exists): None

@cartant cartant force-pushed the static-concat-n-args branch from 8d26c76 to c8629d5 Compare October 27, 2020 00:27
Comment thread src/internal/observable/concat.ts Outdated
@cartant cartant marked this pull request as ready for review October 27, 2020 02:05
@cartant cartant requested review from benlesh and kolodny October 27, 2020 02:05
@cartant cartant changed the title WIP refactor(concat): support N-args with scheduler refactor(concat): support N-args with scheduler Oct 27, 2020
Doesn't matter here, but in situations with more overloads, the 'simple'
signature has to come first.
@cartant
Copy link
Copy Markdown
Collaborator Author

cartant commented Oct 27, 2020

@benlesh FYI, I've pushed some post-approval commits to re-order the signatures so that the signature with the trailing scheduler comes last. Here, it doesn't matter, but if there are two or more trailing arguments, it matters a lot. I've re-ordered these to, hopefully, not give anyone else the wrong idea regarding the ordering of the sigs if this is used as the basis/example for other refactors, etc.

@benlesh benlesh merged commit 1f021fe into ReactiveX:master Oct 28, 2020
@cartant cartant deleted the static-concat-n-args branch November 6, 2020 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants