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

Spec the reduce() operator #171

Merged
merged 3 commits into from
Sep 3, 2024
Merged

Spec the reduce() operator #171

merged 3 commits into from
Sep 3, 2024

Conversation

domfarolino
Copy link
Collaborator

@domfarolino domfarolino commented Aug 27, 2024

This specs the reduce() operator discussed in #126. Tests will be upstreamed in https://chromium-review.googlesource.com/c/chromium/src/+/5817639. That should leave only catch() and finally() operators left.


Preview | Diff

spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 28, 2024
This CL specs the `reduce()` operator to have the same semantics as
the `reduce()` operator in TC39's iterator helpers proposal. See
WICG/observable#171.

R=jarhar

Bug: 40282760
Change-Id: I564b8cf0cf1fef81c0ee42808fad0a5aaddd2fc2
aarongable pushed a commit to chromium/chromium that referenced this pull request Aug 28, 2024
This CL specs the `reduce()` operator to have the same semantics as
the `reduce()` operator in TC39's iterator helpers proposal. See
WICG/observable#171.

R=jarhar

Bug: 40282760
Change-Id: I564b8cf0cf1fef81c0ee42808fad0a5aaddd2fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5817639
Commit-Queue: Dominic Farolino <[email protected]>
Reviewed-by: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1348159}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 28, 2024
This CL specs the `reduce()` operator to have the same semantics as
the `reduce()` operator in TC39's iterator helpers proposal. See
WICG/observable#171.

R=jarhar

Bug: 40282760
Change-Id: I564b8cf0cf1fef81c0ee42808fad0a5aaddd2fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5817639
Commit-Queue: Dominic Farolino <[email protected]>
Reviewed-by: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1348159}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 28, 2024
This CL specs the `reduce()` operator to have the same semantics as
the `reduce()` operator in TC39's iterator helpers proposal. See
WICG/observable#171.

R=jarhar

Bug: 40282760
Change-Id: I564b8cf0cf1fef81c0ee42808fad0a5aaddd2fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5817639
Commit-Queue: Dominic Farolino <[email protected]>
Reviewed-by: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1348159}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Aug 30, 2024
… operator, a=testonly

Automatic update from web-platform-tests
DOM: Implement the `Observable#reduce()` operator

This CL specs the `reduce()` operator to have the same semantics as
the `reduce()` operator in TC39's iterator helpers proposal. See
WICG/observable#171.

R=jarhar

Bug: 40282760
Change-Id: I564b8cf0cf1fef81c0ee42808fad0a5aaddd2fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5817639
Commit-Queue: Dominic Farolino <[email protected]>
Reviewed-by: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1348159}

--

wpt-commits: 2a7b7ed6c088ae592ea3a1aa4437728596648cb8
wpt-pr: 47844
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Sep 3, 2024
… operator, a=testonly

Automatic update from web-platform-tests
DOM: Implement the `Observable#reduce()` operator

This CL specs the `reduce()` operator to have the same semantics as
the `reduce()` operator in TC39's iterator helpers proposal. See
WICG/observable#171.

R=jarhar

Bug: 40282760
Change-Id: I564b8cf0cf1fef81c0ee42808fad0a5aaddd2fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5817639
Commit-Queue: Dominic Farolino <[email protected]>
Reviewed-by: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1348159}

--

wpt-commits: 2a7b7ed6c088ae592ea3a1aa4437728596648cb8
wpt-pr: 47844
Copy link
Collaborator

@benlesh benlesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. As discussed offline, there's the obvious issue that there's not an analog for observable.reduce(fn) that takes a cancellation, because of the argument order: observable.reduce(fn, undefined, { signal }). But that doesn't seem like a big deal. If it ever IS a big deal, there could be an option added to ignore the initialValue, I suppose. But that's one of those "why is this there?" sort of things. :)

@domfarolino domfarolino merged commit d7bc48b into master Sep 3, 2024
2 checks passed
@domfarolino domfarolino deleted the reduce-operator branch September 3, 2024 17:33
github-actions bot added a commit that referenced this pull request Sep 3, 2024
SHA: d7bc48b
Reason: push, by domfarolino

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Sep 6, 2024
… operator, a=testonly

Automatic update from web-platform-tests
DOM: Implement the `Observable#reduce()` operator

This CL specs the `reduce()` operator to have the same semantics as
the `reduce()` operator in TC39's iterator helpers proposal. See
WICG/observable#171.

R=jarhar

Bug: 40282760
Change-Id: I564b8cf0cf1fef81c0ee42808fad0a5aaddd2fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5817639
Commit-Queue: Dominic Farolino <domchromium.org>
Reviewed-by: Joey Arhar <jarharchromium.org>
Cr-Commit-Position: refs/heads/main{#1348159}

--

wpt-commits: 2a7b7ed6c088ae592ea3a1aa4437728596648cb8
wpt-pr: 47844

UltraBlame original commit: a0a2d5d15343b7dd8ba7b31bd8b0114df5e869a1
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Sep 6, 2024
… operator, a=testonly

Automatic update from web-platform-tests
DOM: Implement the `Observable#reduce()` operator

This CL specs the `reduce()` operator to have the same semantics as
the `reduce()` operator in TC39's iterator helpers proposal. See
WICG/observable#171.

R=jarhar

Bug: 40282760
Change-Id: I564b8cf0cf1fef81c0ee42808fad0a5aaddd2fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5817639
Commit-Queue: Dominic Farolino <domchromium.org>
Reviewed-by: Joey Arhar <jarharchromium.org>
Cr-Commit-Position: refs/heads/main{#1348159}

--

wpt-commits: 2a7b7ed6c088ae592ea3a1aa4437728596648cb8
wpt-pr: 47844

UltraBlame original commit: a0a2d5d15343b7dd8ba7b31bd8b0114df5e869a1
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Sep 9, 2024
… operator, a=testonly

Automatic update from web-platform-tests
DOM: Implement the `Observable#reduce()` operator

This CL specs the `reduce()` operator to have the same semantics as
the `reduce()` operator in TC39's iterator helpers proposal. See
WICG/observable#171.

R=jarhar

Bug: 40282760
Change-Id: I564b8cf0cf1fef81c0ee42808fad0a5aaddd2fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5817639
Commit-Queue: Dominic Farolino <[email protected]>
Reviewed-by: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1348159}

--

wpt-commits: 2a7b7ed6c088ae592ea3a1aa4437728596648cb8
wpt-pr: 47844
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