Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,10 @@ if `$promisesOrValues` contains 0 items.
$promise = React\Promise\some(array $promisesOrValues, integer $howMany);
```

Returns a promise that will resolve when `$howMany` of the supplied items in
`$promisesOrValues` resolve. The resolution value of the returned promise
will be an array of length `$howMany` containing the resolution values of the
triggering items.
Returns a promise that will resolve when at least `$howMany` of the supplied items in
Copy link
Member

Choose a reason for hiding this comment

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

at least is wrong here. The output promise fulfills after exactly $howManyfulfill and ignores the rest.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've replaced word resolve with fulfill.

My intention with word at least was to show, that it is enough for $howMany promises to be fulfilled. For example, when we have 3 pending promises, it is enough for 2 of them to be fulfilled. Not exactly 2 should be fulfilled, and 1 should fail.

`$promisesOrValues` fulfill. The resolution value of the returned promise
will be an array of length `$howMany` containing the resolution values of
`$howMany` fulfilled promises that were resolved first.

The returned promise will reject if it becomes impossible for `$howMany` items
to resolve (that is, when `(count($promisesOrValues) - $howMany) + 1` items
Expand Down