Skip to content
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

Update scan.ts #3960

Closed
wants to merge 1 commit into from
Closed

Update scan.ts #3960

wants to merge 1 commit into from

Conversation

domoritz
Copy link

Otherwise this breaks

$brush.pipe(
    scan(
      (acc, curr) => acc.set(curr.dimension, curr.brush),
      new Map<D, Interval<number>>()
    )
  );

@cartant
Copy link
Collaborator

cartant commented Jul 27, 2018

Thanks for opening the PR.

Having a another look at the typings for scan and reduce is on my list of things to do. There are a number of open issues that related to the scan typings: #3150 and #3879. Any changes to the scan typings should take those into account.

The change in this PR appears to be the same as the change suggested in #2897 - which was not merged. See the conversation in that PR for the reasons. I'm not saying that those reasons still apply - and I've not re-read the conversation recently - but it does provide some context.

IMO, now that the testing infrastructure supports dtslint, I don't think we should change the typings until we have dtslint-based tests that document/describe the current behaviour.

Also any changes to the scan typings will likely need to be made to the reduce typings, too.

@domoritz
Copy link
Author

Thanks for getting back to me so quickly. I'm going to close this PR then.

I just started using rxjs yesterday and tripped over this issue. I'll just set the types manually for now.

@domoritz domoritz closed this Jul 27, 2018
@domoritz domoritz deleted the patch-1 branch July 27, 2018 02:51
@cartant
Copy link
Collaborator

cartant commented Jul 27, 2018

Well, hopefully, I've not discouraged you from contributing, as that wasn't my intention.

Anyway, I'll bump the priority of my writing some dtslint tests for scan and reduce, so that any changes we make to the typings need not be so scary.

@domoritz
Copy link
Author

Oh no, I'm not discouraged not at all. I know how open source development goes and I'm impressed how quickly you responded. Thanks for taking my request seriously!

@lock lock bot locked as resolved and limited conversation to collaborators Aug 26, 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.

2 participants