Skip to content

feat(delayWhen): add index to the selector function#2409

Merged
kwonoj merged 1 commit intoReactiveX:masterfrom
martinsik:add-index-to-delaywhen
Mar 16, 2017
Merged

feat(delayWhen): add index to the selector function#2409
kwonoj merged 1 commit intoReactiveX:masterfrom
martinsik:add-index-to-delaywhen

Conversation

@martinsik
Copy link
Copy Markdown
Contributor

This PR adds current index to the selector function in delayWhenoperator.

source.delayWhen((value, index) => {
  ...
});

Related issue (if exists):
#2388

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.0007%) to 97.689% when pulling 5d6291e on martinsik:add-index-to-delaywhen into 046b03d on ReactiveX:master.

@kwonoj
Copy link
Copy Markdown
Member

kwonoj commented Mar 12, 2017

Change looks fine, but I assume TypeScript users who used selector before encounter compilation error by selector signature changes?

@benlesh
Copy link
Copy Markdown
Member

benlesh commented Mar 13, 2017

@kwonoj I don't think so... since arguments are optional in JavaScript, TypeScript shouldn't complain I don't think.

@benlesh
Copy link
Copy Markdown
Member

benlesh commented Mar 13, 2017

@kwonoj confirmed... (a: A, b: B) => void matches (a: A) => void just fine in TS.

@kwonoj
Copy link
Copy Markdown
Member

kwonoj commented Mar 14, 2017

Thanks for confirmation. I'll check this in around today to tomorrow.

@kwonoj kwonoj merged commit 3d84a33 into ReactiveX:master Mar 16, 2017
@benlesh
Copy link
Copy Markdown
Member

benlesh commented Mar 16, 2017

Oops.... @kwonoj, we didn't want to merge this new feature until after we patched the existing minor.

@kwonoj
Copy link
Copy Markdown
Member

kwonoj commented Mar 16, 2017

@benlesh 😱 should this be reverted?

@benlesh
Copy link
Copy Markdown
Member

benlesh commented Mar 16, 2017

@kwonoj yes, please. What I'd like to do is merge all of the minor changes after I merge all of the patches. So we can publish 5.2.1 and 5.3.0 at the same time.

@benlesh
Copy link
Copy Markdown
Member

benlesh commented Mar 16, 2017

ugh.. so we're going to have to re-merge this later. :) @kwonoj can you open another PR with these changes? (no worries @martinsik, your github credit is already in the history :) )

@kwonoj
Copy link
Copy Markdown
Member

kwonoj commented Mar 16, 2017

Yup, will do.

@lock
Copy link
Copy Markdown

lock bot commented Jun 6, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants